Results 1 to 3 of 3
  1. #1
    Zack's Avatar
    Zack is offline Senior Member
    Join Date
    Jun 2010
    Location
    Destiny Islands
    Posts
    692
    Rep Power
    4

    Default 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

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    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)

  3. #3
    Zack's Avatar
    Zack is offline Senior Member
    Join Date
    Jun 2010
    Location
    Destiny Islands
    Posts
    692
    Rep Power
    4

    Default

    Yeah, I think you're right. I'll probably set up an AppletLoader instead. Thanks!

Similar Threads

  1. importing libraries
    By carman12 in forum New To Java
    Replies: 8
    Last Post: 12-16-2010, 05:53 PM
  2. run package inside anthor package
    By AhmedAdel in forum AWT / Swing
    Replies: 4
    Last Post: 04-20-2010, 11:52 AM
  3. Replies: 7
    Last Post: 11-09-2009, 07:51 AM
  4. Replies: 1
    Last Post: 11-04-2009, 02:45 AM
  5. How to load new libraries
    By Manfizy in forum NetBeans
    Replies: 2
    Last Post: 02-11-2009, 06:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •