This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Exporting .jars from Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Exporting .jars from Eclipse" Watch "Exporting .jars from Eclipse" New topic
Author

Exporting .jars from Eclipse

Adam Blais
Greenhorn

Joined: Dec 02, 2004
Posts: 27
I'm using Eclipse to export a jar file of three classes. I specified that the main class was the one with the main method in it, but when I double click the file it says "Could not find the main class. Program will exit." Is there anything else I need to do to get .jars to work?
Vijay Vaddem
Ranch Hand

Joined: Feb 13, 2004
Posts: 243
Try Fat Jar ...

This is a simple plugin to create executable jar files.

U need to have Eclipse 3.0 or later version...

Vijay
Steven Bell
Ranch Hand

Joined: Dec 29, 2004
Posts: 1071
I'm not sure if Far Jar will help you out here. The problem may be in your CLASSPATH. Add '.' to it to indicate the current directory and see if that helps.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Exporting .jars from Eclipse