Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAR - error message... need help!

 
Gaurav Malhotra
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1272
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you end the mainClass text file with a blank line?
[ January 02, 2005: Message edited by: Mike Gershman ]
 
Gaurav Malhotra
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes i did.

Thanks for your reply.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic