I have added the Main-Class heading to the manifest of my jar file. I am not using packages. When I try to run the jar file I get a NoClassDefFound error. I have verified that the class is in the jar. When I run the class outside of the jar it works. My classpath appears to be ok. Does anyone have any ideas on this?
Well, there are a couple of things. First, in your manifest file, make sure you are using Main-Class: with a space after the colon. Make sure the class name on the Main-Class: line does not have the .class extension on it. Next, when creating the jar make sure you are using the right command: jar cvmf <name of manifest> <name of jar>.jar <all files to be included> I apologize if this is too simplistic but I don't know your background. HTH,
Jason R. Kretzer<br />Software Engineer<br />System Administrator<br /><a href="http://alia.iwarp.com" target="_blank" rel="nofollow">http://alia.iwarp.com</a>
Joined: Mar 09, 2001
That seemed to do it. I had two spaces after the Main-Class heading. Thanks.