JOGL, JApplet and Appletviewer (answer)

Im putting this here just so there a reference to the solution online

If you are using the applet viewer for testing a JOGL applet, you may have created a permissions file it could look something like this:


grant
{
      	permission java.io.FilePermission "<<ALL FILES>>", "read, write, delete";
	permission java.util.PropertyPermission "java.io.tmpdir", "read,write";
	permission java.util.PropertyPermission "jnlp.applet.launcher.tmproot", "read,write";
	permission java.util.PropertyPermission "user.home", "read,write"; 
	permission java.util.PropertyPermission "sun.jnlp.applet.launcher", "read,write"; 

	permission java.lang.RuntimePermission "setIO";
	permission java.lang.RuntimePermission "shutdownHooks";  
	permission java.lang.RuntimePermission "getProtectionDomain";
}

Everything launches, but the moment you try and create a GLCanvas, this error comes up:
Exception in thread “AWT-EventQueue-1” java.lang.ExceptionInInitializerError

This does not look like it, but it is also a permissions error, just unlike anything you have seen because it does not include any information you can use to append to your permissions file. Switch your debug permissions file to this


grant
{
	permission java.security.AllPermission;
}

or simply edit “.java.policy” or use the provided policytool in the JRE bin directory and add permission to your Applet only using a codebase like :

grant codeBase “file:/C:/yourAppletDir/” {
permission java.security.AllPermission;
};

Yeah either way. What I wanted was a standalone sandbox that I could check into a repository and have other coders check out. I would argue its easier to create an ‘all.policy’ file and put the following line in ant
appletviewer index.html -J"-Djava.security.policy=all.policy"

…than hunt down the policy file on whatever system your using and specify a code base in a specific directory, and require every person who checks out the application to do the same for every computer.

sry, my fault, I misunderstood your point, I was thinking that you was arguing to put all permission in global policy…