Webstart and JavaCompiler API restrictions
I have an application that has only signed jars, all by the same certificate, mine. I wan't to run the application with Webstart. The application runs a compiler, and the compiled code runs LWJGL. However when I run the application, it returns errors by the compiled code that it literally cant find the LWJGL(-library) packages (the original application can see it fine). When I compile the application as a Trusted-Library, it errors out as well:
Exception in thread "CompilerThread" java.lang.NoClassDefFoundError: com/sun/tools/javac/api/JavacTool
at customcompile开发者_开发技巧.CustomCompile$2.run(CustomCompile.java:82)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.api.JavacTool
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 2 more
http://download.oracle.com/javase/6/docs/technotes/guides/jweb/mixed_code.html I found this site, but it doesn't get me much wiser on the particular subject, since it is clearly related to the compiled code being handled differently than the other code.
Can anyone help me out with this? Or clear it up?
Edit: I have concluded the compiled code is treated as unsigned. Getting the libraries to be recognized, requires them being added in the classpath.
I think redirecting System.getProperty calls and the like, to the signed classes, will solve any problems in the unsigned code, giving it indirectly more rights.
精彩评论