aspose file tools
The moose likes Java in General and the fly likes I created an executable jar file when i execute it i am getting errors Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "I created an executable jar file when i execute it i am getting errors" Watch "I created an executable jar file when i execute it i am getting errors" New topic
Author

I created an executable jar file when i execute it i am getting errors

Anil Verghese
Ranch Hand

Joined: Oct 11, 2006
Posts: 155
Hi,

I have java class that requires certain external jar files. I used netbeans for the developing the class. Then i created an executable jar file by the following steps..
I created a separate folder say New i copied the package where the .class file resides,pasted it into the new folder. alos copied all the external jar file into the lib folder in my New Folder.
Then i created a manifest file

Main-Class: classes\pcbscheduler\Main
Class-Path: lib\jstl.jar lib\commons-beanutils.jar lib\commons-collections-3.2.jar lib\commons-digester.jar lib\commons-logging.jar lib\quartz-jboss-1.6.0.jar lib\quartz-1.6.0.jar

after this i went to the command prompt and did
jar cfm exc.jar manifest.mf *

I got the exc.jar file created.

Now when i try to execute it am getting error saying

Exception in thread "main" java.lang.NoClassDefFoundError: classes\pcbscheduler\
Main

Can any one tell me where i went wrong

Regards
Anil
Vilmantas Baranauskas
Ranch Hand

Joined: Dec 20, 2006
Posts: 89
Is your Main.java located in "classes\pcbscheduler" package or "pcbscheduler" package?

I've never created executable jar files, but I think you probably need following definition:
Main-Class: pcbscheduler.Main


Author of <a href="http://www.newsinjector.com" target="_blank" rel="nofollow">NewsInjector</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I created an executable jar file when i execute it i am getting errors
 
Similar Threads
How to add jar file to eclipse/ant
Executable jar problem
NoClassDefFoundError running a jar file from the command line
Deploying EJB and dependent classes
Java2WSDL in AXIS 1.4 shows shows java.lang.NoClassDefFoundError: org/apache/axis/wsdlgen/Java2WSDL