Results 1 to 3 of 3
Thread: Package Libraries in JAR
- 02-19-2011, 11:29 PM #1
Package Libraries in JAR
Note: Working with an Applet.
I have a group of libraries (LWJGL) that are stored in a specific location on my harddrive. In NetBeans, I have included these libraries in my project, and I can view the Applet in NetBeans, with all the libraries included. But when I compile it for use in a browser, it only compiles MY source files into the JAR. If I attempt to place the library JARs in the same folder, and include them (using archive="jar1.jar,jar2.jar,etc."), errors (posted below) come up about security, and it gives up.
So, I think the ideal solution here is for everything to be compiled into the one JAR file; however, I can't seem to get NetBeans to do this. Suggestions?
Errors: Exception in thread "thread applet-base/Director.class-1" java.lang.ExceptionInInitializerError at org.lwjgl.Sys.createImplementation(Sys.java:111) at org.lwjgl.Sys.<clinit>(Sys.java:98) at org.lwjgl.opengl.Display.<clinit>(Display.java:130) at framework.rendering.RenderKit.StartLWJGL(RenderKit.java:34) at framework.rendering.RenderKit.access$000(RenderKit.java:11) at framework.rendering.RenderKit$1.addNotify(RenderKit.java:54) at java.awt.Container.addImpl(Unknown Source) at java.awt.Container.add(Unknown Source) at framework.rendering.RenderKit.Initialize(RenderKit.java:63) at base.Director.init(Director.java:31) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission org.lwjgl.util.Debug 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 java.lang.Boolean.getBoolean(Unknown Source) at org.lwjgl.LWJGLUtil$4.run(LWJGLUtil.java:450) at org.lwjgl.LWJGLUtil$4.run(LWJGLUtil.java:448) at java.security.AccessController.doPrivileged(Native Method) at org.lwjgl.LWJGLUtil.getPrivilegedBoolean(LWJGLUtil.java:448) at org.lwjgl.LWJGLUtil.<clinit>(LWJGLUtil.java:267) ... 12 more
- 02-19-2011, 11:34 PM #2Moderator
- Join Date
- Feb 2009
- New Zealand
- Rep Power
I would tend to go with the multiple jar approach.
Perhaps the library code actually needs enhanced permissions. You could verify this by creating a single jar archive by hand - I'm guessing you'll see the same error. (but will be glad if I'm wrong)
- 02-20-2011, 12:41 AM #3
Yeah, I think you're right. I'll probably set up an AppletLoader instead. Thanks!
- By carman12 in forum New To JavaReplies: 8Last Post: 12-16-2010, 06:53 PM
- By AhmedAdel in forum AWT / SwingReplies: 4Last Post: 04-20-2010, 11:52 AM
- By oneforall in forum EclipseReplies: 7Last Post: 11-09-2009, 08:51 AM
- By jv_martin in forum EclipseReplies: 1Last Post: 11-04-2009, 03:45 AM
- By Manfizy in forum NetBeansReplies: 2Last Post: 02-11-2009, 07:55 AM