I haen't played with this much, but....
There is a directory in Xj3D
distribution(http://www.hypermultimedia.com/Xj3D/getstart.htm) called
Vrmlet. It has an example of an Applet. My hopes is that it doesn't
have the same problems... try it out, if you get the same error then
I'll take a peak at it.
-Alan
Siau Tan Long wrote:
> I am trying to load a wrl file using vrml97 class. This is the applet
> code to load "mesh.wrl".... public void init(){...URL
> path=getCodeBase();URL filename = new java.net.URL(path.toString() +
> "mesh.wrl");
> Scene loaderScene = null;VrmlLoader vm=new VrmlLoader();
> try {
> loaderScene =vm.load(filename);
> }
> catch (Exception e) {
> System.err.println("Exception loading file: " + e);
> e.printStackTrace();
> System.exit(1);
> }
> .... } This is the error message: Exception loading file:
> java.security.AccessControlException: access denied
> (java.lang.RuntimePermission
> createClassLoader)java.security.AccessControlException: access denied
> (java.lang.RuntimePermission createClassLoader) at
> java.security.AccessControlContext.checkPermission(AccessControlContext.java:272) at
> java.security.AccessController.checkPermission(AccessController.java:399) at
> java.lang.SecurityManager.checkPermission(SecurityManager.java:545) at
> java.lang.SecurityManager.checkCreateClassLoader(SecurityManager.java:610) at
> java.lang.ClassLoader.<init>(ClassLoader.java:234) at
> java.security.SecureClassLoader.<init>(SecureClassLoader.java:79) at
> java.net.URLClassLoader.<init>(URLClassLoader.java:113) at
> com.sun.j3d.loaders.vrml97.impl.Loader$7.run(Loader.java:248) at
> java.security.AccessController.doPrivileged(Native Method) at
> com.sun.j3d.loaders.vrml97.impl.Loader.setWorldURL(Loader.java:245) at
> com.sun.j3d.loaders.vrml97.VrmlLoader.load(VrmlLoader.java:105) at
> Viewer.init(Viewer.java:93) at
> sun.applet.AppletPanel.run(AppletPanel.java:344) at
> java.lang.Thread.run(Thread.java:484) java.lang.NullPointerException at
> Viewer.init(Viewer.java:115) at
> sun.applet.AppletPanel.run(AppletPanel.java:344) at
> java.lang.Thread.run(Thread.java:484) Is there any other things that
> I should do in order to load a VRML file in an applet?
===========================================================================
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".