This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compiling into a .jar on Eclipse

 
Ryan Carter-Reich
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using Eclipse, and I need to compile my project into a .jar file, but every time I try to run the exported file, I get:

Failed to load Main-Class manifest attribute

I've googled it, and from what I've discerned from the results, nothing in the manifest is point to the class with my main() in it. Only problem is, I don't know how to fix it. I can unzip my .jar, but there's nothing in the MANIFEST.mf file, and even if there was, I wouldn't know how to put it back together.

Thanks in advance.
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you export your project in a JAR file, one step of the export wizard is called "JAR Manifest Specification". In this page, you can select your own MANIFEST file. So make one, specify which class is the main class, and JAR everything using that file.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic