Anil Kumar
Anil Kumar

Reputation: 1095

How to include library files while creating jar files

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.

Upvotes: 3

Views: 4330

Answers (2)

aioobe
aioobe

Reputation: 420991

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.

Upvotes: 2

user496934
user496934

Reputation: 4020

Check whether the jar is there in the classpath.

Upvotes: 0

Related Questions