Hi,
I’m trying to implement an Applet that deploys both the jogl natives and jars onto the users system (like the Madlix viewer).
Natives and jars are copied across to users machine correctly
I put gluegen-rt and jogl.jar into classpath using following code
URLClassLoader sysloader = (URLClassLoader)ClassLoader.getSystemClassLoader();
Class sysclass = URLClassLoader.class;
try {
Class[] parameters = new Class[]{ URL.class };
Method method = sysclass.getDeclaredMethod( "addURL", parameters );
method.setAccessible( true );
method.invoke( sysloader, new Object[]{ u } );
}
And then try to load the natives using code hived from the JOGLAppletLauncher.
I get a problem when I call com.sun.opengl.impl.NativeLibLoader.disableLoading();
Stack trace :-
java.lang.ExceptionInInitializerError
at LibInstall.loadNativeLibraries(LibInstall.java:410)
at LibInstall.start(LibInstall.java:53)
at DeployTest.init(DeployTest.java:14)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission sun.jnlp.applet.launcher read)
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.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at com.sun.opengl.impl.NativeLibLoader$4.run(NativeLibLoader.java:158)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.opengl.impl.NativeLibLoader.(NativeLibLoader.java:156)
… 5 more
What could be going wrong?
Thanks
Stu.