This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization 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