Login  Register

Re: Jogl Build Headache

Posted by Penny on Dec 07, 2013; 2:26pm
URL: https://forum.jogamp.org/Jogl-Build-Headache-tp4030758p4030818.html

Hi Gouessej,

I looked at the URLs and they are fine as my loader applet returned valid URLs on getResource().

What seems to be the trouble is that whilst my "loader" applet is signed and trusted and has full system access the classes which are dynamically loaded are not. Every time I try to access a file, system clipboard and class loaders, eg whats outside the sandbox, I get access control exceptions...

java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getClassLoader")

Any thread entering the dynamically loaded classes losses its security clearance and despite passing valid URLs to these classes they cannot access the files despite being in trusted and signed jars.

Is there some way I can enable these dynamically loaded classes to the same status as the applet loader?

My next step would be to pass simple data structures from the loader to the dynamically loaded classes if I cannot give my dynamically loaded classes security clearance.

My little trick is an unsecured thread makes a call to the applet loader with the required resource name. The applet loader has an internal sleeping thread that is notified by the unsecured thread, the unsecured thread then subsequently waits. The internal secured thread then performs the getResource() with the provided name and loads the image or data to a buffer then passes this information to the waiting unsecured thread and notifies it before waiting. The unsecured thread then returns with the required data.

If I cannot enable my dynamically loaded classes security clearance this is what I will need to do all be it a little long winded and it would need to by synchronized to ensure only 1 fetch occurred at a time.

Please help.
Regards
Penny