The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
September 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Same problem

Posted by elly on February 06, 2002 at 12:55 PM

I have the exact same problem of no main find.
I created a manFile.txt file and put in it

>>Main-Class: com.cibc.rewardpts.RewardsMain

Then on the comand line I created my jar file this way

>>jar cmf manFile.txt jarFile.jar runClass\classes\com\cibc\rewardspts\RewardsMain.class

this creates a jar file with the heading manifest of

>>
META-INF/
META-INF/MANIFEST.MF
runClass\classes\com\cibc\rewardspts\RewardsMain.class

then I did this

>>jar uf jarFile.jar runClass\classes\com\cibc\rewardspts

to add the rest of my classes into the jar file.
By the way this is not the directory src, where I would have all my .java files but it is all my .class files, even my main RewardsMain, is a .class file!!!?

Then I try to run it like this

>>java -jar jarFile.jar

and this is the message I get?

Exception in thread "main" java.lang.NoClassDefFoundError: com.cibc.rewardpts.RewardsMain

Help ASAP please



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us