Well, seems Java’s runtime environment has gotten more strict as new versions of it came out. When you load an applet and you get this message

java.lang.SecurityException: Your security settings have blocked an application from running with an insecure or expired jre.

There is only one solution as a user to make the applet run. You will have to lower the security settings in your Java settings.

Go to Control Panel then open Java icon. Go to security tab and set the security setting to medium. That should run the applet.

security

 

Just be sure you trust the publisher or else your PC will be at risk. This is the only solution possible since the other way is to wait for the publisher of the applet to repackage the jar file with manifest attributes that will enable the latest Java runtime environment to run the applet.

This is a fairly common problem that newbies using Google Web Kit within Eclipse encounter with their the Java Runtime Environment. Chances are you just upgraded your JRE to 1.6.0_31.

The solution is to add an extra parameter in your virtual machine run configuration using either:

-Dappengine.user.timezone=UTC

If that does not work, try this.

-Dappengine.user.timezone.impl=UTC

To go to the run configuration, do the following:

  1. Right click project name
  2. Go to Run As > Run Configurations
  3. Go to Arguments tab
  4. Under VM Arguments, add the extra parameter, then click Run button

There you go! That should get you back into development mode!

Since the Comparator class is part of the Java programming language, Android should do too. However, my experience with using them seem to indicate that it may not work all the time. Even I think it does not work in Android.

Has anyone else experienced this? Or even used it and worked? I made a Comparator class and ran it in Java’s runtime environment. It worked correctly. When I used the same class and sorted an ArrayList object in the Android emulator, it did not work. The sorting was different.

Now, I have no idea why. I always thought that there was something wrong with my custom Comparator class because the output in the Android emulator was always wrong. When I ran it in the JRE (since it was faster), the output was correct.

There should not be any rules to using comparators in the Android emulator. How they are used should be the same as when used in the Java Runtime Environment.

Please share your thoughts. Your inputs are highly appreciated and may help me know the limitations and what ifs when using a Comparator class in an Android emulator.

Related Posts Plugin for WordPress, Blogger...