aspose file tools*
The moose likes Java in General and the fly likes jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "jar" Watch "jar" New topic
Author

jar

Ruslan Ivanov
Ranch Hand

Joined: Feb 22, 2001
Posts: 72
I followed the direction on sun's site how to create executable jar file but i didn't get far i get an error when trying to run the jar file.
What i did was after creating jar file i modifed the manifest file to have an entry for Main-Class: myClass
but when running the jar file i get no main class is found. What can cause this? Can this be effected by a classpath ? Do i have to include a classpath information into manifest entry?
Thanks.
Barry Andrews
Ranch Hand

Joined: Sep 05, 2000
Posts: 523

How are you trying to run the jar file? From command line? Can you give exactly what you typed in? Also, I don't know if this makes a difference, but I think you need to create the manifest file before making the jar. Give some more information, and I will try to help.
Thanks,
Barry
Ruslan Ivanov
Ranch Hand

Joined: Feb 22, 2001
Posts: 72
thanks for replying i solved the problem.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Don't hold out on us, what was the solution?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jar
 
Similar Threads
problem finding resouircebundle?
Jar manifest problem
Jar file exception due to not finding Oracle driver but other standalone programs can use it
Jar execution command
how to run java -jar with args?