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

How to generate jar using NetBeans

 
Enrique Nivasch
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using NetBeans 6.1 to develop my software on a Vista based machine. My application is currently made up of two classes that live as two separate source files. When I click on the Run Main Project button on the IDE everything works fine. If I click on the Build Main Project button and the double click on the generated .jar file that sits in the dist folder I get a �Could not find the main class. Program will exit.� Message. How should I generate the jar file so it will run?


Thanks,

Enrique
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33696
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Enrique,
Welcome to JavaRanch!

We have a forum dedicated to IDEs. I'll move this for you.
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's because there's no Main-Class field in your MANIFEST.MF. In order for NetBeans to add the Main-Class field in the MANIFEST.MF, you need to set the main class in your NetBeans project.
1. Right click on the project->Properties->Run
2. Set the main class.

Hope this helps.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic