Forums Login/signup

Problem running an executable jar

+Pie Number of slices to send: Send
I have been trying to run a jar. There is a manifest file in it. I have 2 other external jars that are to be used by my application namely log4j.jar and db2jcc.jar.
It is throwing a NoClassFoundException saying that the Logger class cannot be found. What am I supposed to add in manifest file. (Carriage Return has been properly given). Am i supposed to add something in the class path.

Please help me in this regard.

Regards
+Pie Number of slices to send: Send
Yes. The other JAR file. You need to add it to the manifest.
+Pie Number of slices to send: Send
I just pulled out one of our exec JAR files for an example. Here's the setting in the manifest:

Class-Path: lib/jai_codec.jar lib/jai_core.jar lib/mlibwrapper_jai.jar lib/jtds-1.2.jar



As you can see we use JAI and JTDS. The JAR files for these are in a folder named "lib" which is in the same directory as the executable JAR. The classpath MUST be set in the manifest, the environment variables and -cp option will be ignored when you use -jar.
+Pie Number of slices to send: Send
Thanx it worked. i was putting a '\' in front of the lib and it was not working. now it works!!!

reply
reply
This thread has been viewed 908 times.
Similar Threads
creating jar using external libraries
refering a property file in the manifest
Creating Jar files with external libraries
How to use manifest.mf ?
Cannot register driver
More...

All times above are in ranch (not your local) time.
The current ranch time is
Jul 09, 2025 09:04:38.
close