1

I have project called test in Eclipse which I want to export into Runnable JAR file. During the process of exporting the project, when I choose as a location of JAR file the subfolder of test folder in file system, such as C:/.../test/App.jar, it will work. However, when I want to put it for example on my desktop, it will run but in a very limited look (some GUI components missing) and it throws a lot of exceptions saying something like that:

at java.awt.EventDispatchThread.run(Unknown Source) xception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class com.sun.opengl.impl.windows.WindowsGLDrawableFactory
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Unknown Source)
       at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java}

What can be the problem? I assume it is not good that I have to specify my JAR file concretely into one folder in file system, it would become unuseful for any other potentional user.

Bill
  • 5,263
  • 6
  • 35
  • 50
MichalB
  • 3,281
  • 6
  • 32
  • 46

1 Answers1

0

Looks like the jar needs other jars to execute. In this case you would have to set the classpath before you execute the jar

This might help you with your problem.

Community
  • 1
  • 1
Adarsh
  • 3,613
  • 2
  • 21
  • 37