aspose file tools*
The moose likes Beginning Java and the fly likes JAR - error message... need help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JAR - error message... need help!" Watch "JAR - error message... need help!" New topic
Author

JAR - error message... need help!

Gaurav Malhotra
Greenhorn

Joined: Jan 02, 2005
Posts: 2
Hello i have been trying to create a JAR file so i can run the code straight away without any dos commands.

Code:


1) I created a text file with the following code:

Main-class: gaurav

.... and saved it as mainClass (no extension)


2) In MS DOS i typed the following command:

jar cmf mainClass emain.jar *



I created the jar file but now i recieve the following error:



Failed to load main-class manifest attribute from
c:\documents and settings\*\javafiles\new\emain.jar



What could be the problem?
Mike Gershman
Ranch Hand

Joined: Mar 13, 2004
Posts: 1272
Did you end the mainClass text file with a blank line?
[ January 02, 2005: Message edited by: Mike Gershman ]

Mike Gershman
SCJP 1.4, SCWCD in process
Gaurav Malhotra
Greenhorn

Joined: Jan 02, 2005
Posts: 2
Yes i did.

Thanks for your reply.
 
Consider Paul's rocket mass heater.
 
subject: JAR - error message... need help!