Hi,
I was trying
to read a vrml file from a .jar archive in an Applet. I used
"this.getClass().getClassLoader().getResource(file);"
in my code. But the result is
rather confusing: when i visited the applet from a Windows2003 platform the vrml
file can be read and displayed, but when the applet was visited from a WindowsXP
platform the following error occurs:
java.lang.NegativeArraySizeException
at
com.sun.j3d.loaders.vrml97.impl.ContentNegotiator.startLoading(ContentNegotiator.java:88)
at
com.sun.j3d.loaders.vrml97.impl.ContentNegotiator.run(ContentNegotiator.java:63)
Exception loading URL:
java.lang.NullPointerException
java.lang.NullPointerException
at
java.io.ByteArrayInputStream.<init>(Unknown Source)
at
com.sun.j3d.loaders.vrml97.impl.Loader.openURL(Loader.java:276)
at
com.sun.j3d.loaders.vrml97.impl.Loader.load(Loader.java:293)
at
com.sun.j3d.loaders.vrml97.VrmlLoader.doLoad(VrmlLoader.java:112)
at
com.sun.j3d.loaders.vrml97.VrmlLoader.load(VrmlLoader.java:106)
at
RelicViewer.loadVRML(RelicViewer.java:156)
at
RelicViewer.createSceneGraph(RelicViewer.java:129)
at
RelicViewer.init(RelicViewer.java:287)
at
sun.applet.AppletPanel.run(Unknown Source)
at
java.lang.Thread.run(Unknown Source)
com.sun.j3d.loaders.ParsingErrorExceptionjava.security.AccessControlException:
access denied (java.lang.RuntimePermission exitVM)
at
java.security.AccessControlContext.checkPermission(Unknown
Source)
at
java.security.AccessController.checkPermission(Unknown
Source)
at
java.lang.SecurityManager.checkPermission(Unknown Source)
at
java.lang.SecurityManager.checkExit(Unknown Source)
at
java.lang.Runtime.exit(Unknown Source)
at
java.lang.System.exit(Unknown Source)
at
RelicViewer.loadVRML(RelicViewer.java:166)
at
RelicViewer.createSceneGraph(RelicViewer.java:129)
at
RelicViewer.init(RelicViewer.java:287)
at
sun.applet.AppletPanel.run(Unknown Source)
at
java.lang.Thread.run(Unknown Source)
java.security.AccessControlException: access denied
(java.lang.RuntimePermission exitVM)
at
java.security.AccessControlContext.checkPermission(Unknown
Source)
at
java.security.AccessController.checkPermission(Unknown
Source)
at
java.lang.SecurityManager.checkPermission(Unknown Source)
at
java.lang.SecurityManager.checkExit(Unknown Source)
at
java.lang.Runtime.exit(Unknown Source)
at
java.lang.System.exit(Unknown Source)
at
RelicViewer.loadVRML(RelicViewer.java:166)
at
RelicViewer.createSceneGraph(RelicViewer.java:129)
at
RelicViewer.init(RelicViewer.java:287)
at
sun.applet.AppletPanel.run(Unknown Source)
at
java.lang.Thread.run(Unknown Source)
Anyone knows why?
thanks.
Jeff
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".