Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » can't run jar file(exporting jar files)
can't run jar file [message #907325] Mon, 03 September 2012 19:13 Go to next message
karl neumann is currently offline karl neumannFriend
Messages: 2
Registered: August 2012
Junior Member
After having developed my first java applet which runs great in eclipse, I exported the project to a jar file. When I try to run the jar file from a command prompt I get: "no main manifest attribute, in MyClass.jar". I added the following line to the MANIFEST.MF file: Main-Class:org.eclipse.jdt.MyClass . I still get the same message when trying to run the jar file. I am not sure about the org.eclipse.jdt part. It's a guess. What am I doing wrong? Another observation, the MyClass.java source file does not have a main() or init() method. I don't know if that is relevant or not. I am at wits end trying to figure this out. Please help!
Re: can't run jar file [message #907469 is a reply to message #907325] Tue, 04 September 2012 04:15 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3268
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 09/03/2012 01:13 PM, karl neumann wrote:
> After having developed my first java applet which runs great in eclipse,
> I exported the project to a jar file. When I try to run the jar file
> from a command prompt I get: "no main manifest attribute, in
> MyClass.jar". I added the following line to the MANIFEST.MF file:
> Main-Class:org.eclipse.jdt.MyClass . I still get the same message when
> trying to run the jar file. I am not sure about the org.eclipse.jdt
> part. It's a guess. What am I doing wrong? Another observation, the
> MyClass.java source file does not have a main() or init() method. I
> don't know if that is relevant or not. I am at wits end trying to figure
> this out. Please help!

This might help.

http://www.javahotchocolate.com/tutorials/jars-and-wars.html#runnable
Previous Topic:Eclipse Juno WAS 6.1 server adapter
Next Topic:How to check out a specific version of Eclipse's built in plugin
Goto Forum:
  


Current Time: Mon Dec 22 22:54:18 GMT 2014

Powered by FUDForum. Page generated in 0.01812 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software