PDA

View Full Version : Java applet won't run




tnsmart
Oct 2, 2012, 05:52 PM
I am trying to get the Java applet found here: http://phet.colorado.edu/en/simulation/molecule-shapes to run.

I'm running Mac OS X 10.8.2 and Java SE 6 version 1.6.0_35-b10-428 (according to Java Preferences).

If I click the "Download" button, a 5.7 MB "molecule-shapes_en.jar" file is downloaded. When I open it, it opens up JavaVersionChecker and I just get this:

365825 and it stays like that until I quit JavaVersionChecker.

If I click the "Run Now!" button, a 1 KB file is downloaded and when I open that I get each of these in succession for about half a second and then nothing:

365826

365825

365827

Any ideas on how I can get this to run? Also, what is the difference between the .jar and .jnpl filetypes? Thanks!



mgdominguez
Oct 3, 2012, 11:20 AM
I am trying to get the Java applet found here: http://phet.colorado.edu/en/simulation/molecule-shapes to run.

I'm running Mac OS X 10.8.2 and Java SE 6 version 1.6.0_35-b10-428 (according to Java Preferences).

If I click the "Download" button, a 5.7 MB "molecule-shapes_en.jar" file is downloaded. When I open it, it opens up JavaVersionChecker and I just get this:

365825 and it stays like that until I quit JavaVersionChecker.

If I click the "Run Now!" button, a 1 KB file is downloaded and when I open that I get each of these in succession for about half a second and then nothing:

365826

365825

365827

Any ideas on how I can get this to run? Also, what is the difference between the .jar and .jnpl filetypes? Thanks!

Java has become a bit hard on OS X since Lion. You mention that Java 1.6 is installed, but according to the screenshots it seems the applet is trying to use Java 7, which you might not have it installed.

You can get Java 7 directly from Oracle (http://www.oracle.com/technetwork/java/javase/downloads/jre7u7-downloads-1836441.html).

After you installed it, go back to Java Preferences and put Java 7 as the first option on the list and make sure it's checked. There is also a check mark at the top of the panel that toggles Web Start. I'm not at my Mac right now, so I don't remember the exact wording, but it has to be enabled if you want to run any applet.

Regarding jnpl files, here's an article on Wikipedia (http://en.wikipedia.org/wiki/Java_Web_Start)

If you can avoid using this applet, or find an alternative, I'll advised against installing Java. There have been a lot of security holes recently that affect Java, so I haven't installed it again on ML. I'm using a VM to do Java development on my Mac, and while the security holes are still there, they only affect the VM and not my main system.

tnsmart
Oct 5, 2012, 06:23 PM
Thanks for the reply. To make sure that I'm running the latest version of Java, I downloaded it from Oracle. The installer said that it was installing Java 7 Update 7 and said that it complete successfully.

However, the Java Preferences window that lists the version number hasn't changed:
366874

And I don't see any Web Start toggle. Which version am I running?
Does anybody know how I can completely uninstall Java so that I can reinstall a fresh copy? The uninstall steps here (http://www.java.com/en/download/help/mac_uninstall_java.xml) don't seem to be very thorough/complete.

Thanks again!

mgdominguez
Oct 6, 2012, 11:00 AM
Thanks for the reply. To make sure that I'm running the latest version of Java, I downloaded it from Oracle. The installer said that it was installing Java 7 Update 7 and said that it complete successfully.

However, the Java Preferences window that lists the version number hasn't changed:

And I don't see any Web Start toggle. Which version am I running?
Does anybody know how I can completely uninstall Java so that I can reinstall a fresh copy? The uninstall steps

Thanks again!

Uninstalling Java is a bit of an ordeal, and I kinda messed up my laptop the last time I tried, so I'll advise against uninstalling it. Usually unchecking the versions show on the screenshot is sufficient to disable them.

Your screenshot looks quite different than mine (I'm not at my Mac right now, so I can't upload a screenshot). However the reason you are not seeing the Java version listed is because you installed the JRE. I installed the JDK on my machine since I do Java development, and I assumed that the JRE would be sufficient for your needs, but according to this note (http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-preferences.html) I was wrong, sorry. I haven't found a way to switch the JRE to the Oracle one, so it seems it would be easier to download the full JDK and just rearrange the list per the Oracle installation instructions. You can download it from here (http://www.oracle.com/technetwork/java/javase/downloads/jdk7u7-downloads-1836413.html)

fsefersf
Jan 10, 2013, 03:38 AM
Once I also encountered the similar problem. Java is always hard to deal with. :o