|
hi,
has anyone tried to use the vrml97 loader with an
Applet and viewing a model through a browser (or appletviewer)? it seems
like Java Security prevents opening a URL file stream to get to the .wrl data
file which i think is what the vrml97 loader does. this security breech
occurs when i "load" the vrml97.jar file with a manifest "Class-Path:
vrml97.jar" declaration in my TestVRMLViewer.jar (the HTML page accesses ARCHIVE
= TestVRMLViewer.jar). the breech goes away when i put the vrml97.jar file
in my jre/lib/ext folder. is it because Java just trusts "local
extensions" (extensions in the jre/lib/ext folder) more than externally loaded
extensions (with the Manifest declaration) with regards to opening a file
stream? is there a way around this breech without having to install
vrml97.jar into the jre/lib/ext folder?
the exact violation looks like (from the java
console running from msft internet explorer):
java.security.AccessControlException: access denied
(java.net.SocketPermission MyServerName resolve)
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.checkConnect(SecurityManager.java:1042)
at
java.net.InetAddress.getAllByName0(InetAddress.java:559)
at
java.net.InetAddress.getAllByName0(InetAddress.java:540)
at
java.net.InetAddress.getByName(InetAddress.java:449)
at
java.net.Socket.<init>(Socket.java:100)
at
sun.net.NetworkClient.doConnect(NetworkClient.java:50)
at
sun.net.NetworkClient.openServer(NetworkClient.java:38)
at
sun.net.ftp.FtpClient.openServer(FtpClient.java:267)
at
sun.net.ftp.FtpClient.<init>(FtpClient.java:381)
at
sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:77)
at
sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:96)
at
sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:224)
at
sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:41)
at
sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:137)
at
java.security.AccessController.doPrivileged(Native Method)
at
sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:134)
at
sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at
sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:108)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at
ButtonPressApp.createSceneGraph(ButtonPressApp.java:81)
at
ButtonPressApp.init(ButtonPressApp.java:316)
at
sun.applet.AppletPanel.run(AppletPanel.java:344)
at
java.lang.Thread.run(Thread.java:484)
thanks.
jack
|
