3

How to include JOGL.jar and Gluegen-rt.jar in the java project? I have included these external jars in the eclipse, but when I try to create a Jar file of the project, the JAR file does not exceute. It says That JOGL.jar is missing.

How can I include these libraries? Any suggestions are welcome.

Anil Kumar
  • 1,065
  • 1
  • 13
  • 24

2 Answers2

2

How can I include these libraries? Any suggestions are welcome.

Either you distribute multiple jar-files, and make sure the referenced jar-files are mentioned in the classpath in the manifest of your application.

However, since you say "include" I suspect you want to "merge" the jar files into a single jar file. In that case you need to merge the jars using software such as OneJar or FatJar.

aioobe
  • 413,195
  • 112
  • 811
  • 826
  • Additional possibility with Maven: Create a [jar-with-dependencies](http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#jar-with-dependencies). – Thomas Aug 17 '11 at 12:31
  • 1
    If the OP is using Eclipse, he/she should have a "make fat-jar" option when right-clicking the project. – Raveline Aug 17 '11 at 12:33
0

Check whether the jar is there in the classpath.

user496934
  • 3,822
  • 10
  • 45
  • 64