AccessControlException on JOGL JApplet

Hi, I have successfully created a JOGL JApplet that runs on my Eclipse ;D. But when I deployed it out to the web, I get the following exception ???:

Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.jawt) 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.checkLink(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at net.java.games.jogl.impl.NativeLibLoader.(NativeLibLoader.java:44)

What grants do I have to give in my policy file?

Thanks in advance!

If you run this as an applet (I mean APPLET, EMBED or OBJECT tag in your web page), you probably should ask [require?] your user to install JOGL as a standard extension to his JRE, because of AFAIK there is no other way to deploy native libraries that JOGL use (DLLs). To do that, noe needs to download the JOGL jar and dll and copy them to jre/lib/ext and jre/bin respectively.

Yuri

Yup, I made sure that I had the JAR file and the DLL file in the correct location. The error that I was getting was
java.security.AccessControlException, which I believe is caused by the JAVA security.
Also, I was searching on the web for a demo of JOGL applets (not applications), but was unable to find any. Has anyone successfully implemented a JOGL applet?

FunkyMonkey

if you sign your applet then instead of having to set security permissions I believe it will just pop up with a dialog box asking the user if they want to run the app - similar to any JWS application requesting full security permissions.

There will very soon be a tutorial about JWS (covering signing which may apply to you) on xith.org (under Tutes/Getting Started Guide).

Will.

Thanks Will! ;D

I’ll definitely check it out and try it.

FunkyMonkey

http://www.xith.org/tutes/GettingStarted/html/deploying_xith3d_games_with.html

Now that’s geared to JWS - but it in very simple steps shows you how to sign applets.

This tute I found specifically for applets - no idea how good it is: http://www.raditha.com/java/sandbox/unsigned.php

I should note that you only have to Sign the bits that the user downloads with the applet - so unlike JWS you don’t have to go around signing JOGL etc (assuming this is already installed).

That said I am not sure how well JOGL is suited for Applets for general distribution - JWS is probably more effective in most cases where you have no controll over the user’s environment - but that’s up to you. Of course - you could always create a JOGL installer using JWS… :slight_smile:

Incidentally the tutorial I have written (link above) can be used as a guide to make most JOGL based applications (or just applications in general) Java Web Startable - just cut out the Xith3D specific stuff.

Cheers,

Will.