Results 1 to 3 of 3
Thread: Package Libraries in JAR
- 02-19-2011, 10: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?
Java Code: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, 10:34 PM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,548
- Rep Power
- 11
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-19-2011, 11:41 PM #3
Yeah, I think you're right. I'll probably set up an AppletLoader instead. Thanks!
Similar Threads
-
importing libraries
By carman12 in forum New To JavaReplies: 8Last Post: 12-16-2010, 05:53 PM -
run package inside anthor package
By AhmedAdel in forum AWT / SwingReplies: 4Last Post: 04-20-2010, 11:52 AM -
The declared package does not match the expected package
By oneforall in forum EclipseReplies: 7Last Post: 11-09-2009, 07:51 AM -
different external libraries for different OS and CVS
By jv_martin in forum EclipseReplies: 1Last Post: 11-04-2009, 02:45 AM -
How to load new libraries
By Manfizy in forum NetBeansReplies: 2Last Post: 02-11-2009, 06:55 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks