Skip to main content

Oracle's Java demos crashing on Mac

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
erikn
Offline
Joined: 2006-06-26

I've been trying to understand the latest advice about deploying an applet for viewing in a browser web page.
I've looked at what seem to be the latest pages of advice (it's hard to tell as most pages about Java at Oracle's website are undated).

Many of these Oracle pages have applets in them that do not work on my Apple Mac OS X 10.6.5 system (using Safari or Firefox; with up to date Java 10.6.0_22). This is hardly confidence inspiring, to say the least.

Here are 3 examples among many I've encountered.

Example #1

Here is a page titled "Deploying an Applet"
http://download.oracle.com/javase/tutorial/deployment/deploymentInDepth/...
On that page they ask you to "Open DeployUsingJNLP.html in a browser to view the the Java2D applet."
The link for that page is at:
http://download.oracle.com/javase/tutorial/deployment/deploymentInDepth/...
If I go to that page, I get an Application Error dialog with a General Exception, clicking details shows:
java.lang.ClassNotFoundException: java2d.Java2DemoApplet
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:181)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:144)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:662)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:785)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2354)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:714)
at sun.applet.AppletPanel.run(AppletPanel.java:368)
at java.lang.Thread.run(Thread.java:680)

There is the following note on the "Deploying an Applet" page:
Note: If you don't see the applet running, you need to install at least the Java SE Development Kit (JDK) 6 update 10 release.
I currently have Java Version: 1.6.0_22 from Apple Inc. As far as I know I have the JDK as well (I'm able to develop Java applets on the command line). But shouldn't this demo work for an end-user? Why is the JDK necessary?
The applet does work for me under Windows XP with IE8.

Example #2

Here is a page titled "Release Notes for the Next-Generation Java™ Plug-In Technology" at https://jdk6.dev.java.net/plugin2/
(Curious, why is it https instead of http?).
Loading this page on Windows I get a scary and confusing Security Warning dialog: "Do you want to view only the webpage content that was delivered securely?". I guess this is because of the use of https. But the applet on that page does run.
On Mac, I get an Application Error dialog:
java.lang.ClassNotFoundException: Ignored
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:211)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:144)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:662)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:785)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2354)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:714)
at sun.applet.AppletPanel.run(AppletPanel.java:368)
at java.lang.Thread.run(Thread.java:680)

Example #3

Linked from the "Release Notes for the Next-Generation Java Plug-In Technology" page is this page:
https://scenegraph-demos.dev.java.net/demo-applets.html
These run under Windows XP/IE 8, but under Mac each applet shows the text "Click here to get the new Java Plug-in", but clicking there does nothing.

Conclusion

How am I supposed to trust a technology when the vendor's demo pages don't even work?

Granted, Java faces some difficult issues in maintaining compatibility across operating systems and browsers. Granted, Java and Apple are not getting along well nowadays.

But: shouldn't the vendor's demo pages at least make clear about situations where failures are occuring, and explain how its not their fault?

Do I have something wrong in my Mac setup? Or are the Oracle pages on this subject really this bad?