This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Jar issue - NoClassDefFoundError when attempting to run.  Class-Path set in MANIFEST.MF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Jar issue - NoClassDefFoundError when attempting to run.  Class-Path set in MANIFEST.MF" Watch "Jar issue - NoClassDefFoundError when attempting to run.  Class-Path set in MANIFEST.MF" New topic
Author

Jar issue - NoClassDefFoundError when attempting to run. Class-Path set in MANIFEST.MF

Rob lar
Greenhorn

Joined: Mar 29, 2010
Posts: 1
Hey all,

I spend most of my time doing web development, and rarely write standalone Java applications. A recent project had me put one together, and I'm banging my head against the wall with (what I believe are) Class-Path issues now.

The program I'm attempting to run has been packaged into a .jar. I'm using Maven to build it. There are 5 other jars that it is dependent on. I've put all 6 jars into the same folder for now for simplicity's sake.
The directory contains:

eBisDataFeed-201003.0.1.jar <- home of the main class
commons-logging-1.1.jar
commons-net-2.0.jar
exporter-200908.0.1.jar
jt400-5.4.0.4.jar
log4j-1.2.13.jar
poi-3.2-FINAL.jar

Maven is generating the following MANIFEST.MF file:


I get the following error message when I try to run this:


The class in question "com.mlb.sql.exporter.SQLScriptDirectoryDumper" is contained in the "exporter-200908.0.1.jar". I have verified the class is built and in there.

I've attempted to gut the entire main method, and just System.out.println("something");... which works... so I know it can find the main class.
It's when I re-include the code that is dependent on the SQLScriptDirectoryDumper that it gives me the error.

I'm at a loss. As far as I can tell, the MANIFEST is configured properly, and the classes are there.

What am I doing wrong?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jar issue - NoClassDefFoundError when attempting to run. Class-Path set in MANIFEST.MF
 
Similar Threads
cannot find main class.program will exit. error in jar file creation
xxxx.jar seen as xxxx.zip on desktop and won't run
Problem executing jar
Exception
Hssf error