• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 337
  • Last Modified:

Create Jar help

hello there,

i have installed Fat Jar Eclipse Plug-In.but when i create the jar and try to run i get error saying main class not found.can somebody guide m ehow to create a jar file of my application.below is the setting i have chosen.please help me.also i dont want the java files to be in the jar file.i only want the class files.

cheers
ZOlf
1.JPG
0
zolf
Asked:
zolf
  • 4
  • 3
  • 2
  • +1
2 Solutions
 
wwnosalCommented:
Just show which is your main classe  by clicking on Browse button next to Main-Class label...
If its a plugin-that does not have a main class and should be run within other application you should put your jar on classpath and run the main class of the other application....
0
 
zolfAuthor Commented:

here is the shot when i select the main.in my Manifest.mf file i mntion the main method

Manifest-Version: 1.0
Class-Path: sqljdbc.jar calendar-0.10.jar jcalendar-1.3.2.jar commons-logging-1.1.jar commons-collections-3.2.jar jasperreports-3.0.0.jar forms-1.2.0.jar looks-2.2.0.jar validation-2.0.1.jar binding-2.0.3.jar
Main-Class: com.MainForm
2.JPG
0
 
CEHJCommented:
>>here is the shot ...

Looks fine - what's the problem now?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
zolfAuthor Commented:

when i clcik on the jar i get main class not found error
0
 
basav_comCommented:
You can select only .class files from the last screen(select files option) of the Fat jar explorer window. See the attached pic. Uncheck all .java files from the list.

fatjar.JPG
0
 
basav_comCommented:
The procedure you are following is correct only. Please post the following info to debug your issue.
(i) Java code that you are using.
(ii) Un-zip the .jar created using Fat jar and then copy paste the MANIFEST.MF file content here
0
 
zolfAuthor Commented:

>>Java code that you are using.
i did not get this.what you mean
0
 
basav_comCommented:
I mean actual java source code. (Does it really contain main class ?)
0
 
zolfAuthor Commented:

yes it contains the main class.let me try again
0
 
wwnosalCommented:
Show us the manifest after unpacking the jar..
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 4
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now