Skip to main content



      Home
Home » Newcomers » Newcomers » How to get File, Export Jar to work?
How to get File, Export Jar to work? [message #85778] Tue, 12 July 2005 19:07 Go to next message
Eclipse UserFriend
Originally posted by: ewing.discoverypartners.com

We've gotten Eclipse's "File, Export Jar" function to work OK with Eclipse
3.0.x but now I'm stumped. When I try to run the jar, Java always gives
the message "Could not find the find main class."

Using winzip to peek inside the jar, the main class certainly is in there.


The manifest.mf inside of the jar looks like this:

Manifest-Version: 1.0
Class-Path: lib\org.eclipse.core.runtime_3.1.0.jar lib\org.eclipse.jfa
ce.text_3.1.0.jar lib\org.eclipse.jface_3.1.0.jar lib\org.eclipse.osg
i_3.1.0.jar lib\org.eclipse.swt_3.1.0.jar lib\org.eclipse.text_3.1.0.
jar
Main-Class: com.companyname.test.MainWindow


The manifest input file used to generate the jar is a text file that
doesn't have the line wrap shown above. We made sure the Class-Path line
is all one line, in case that matters.

What I have done, which has been our practice for some time now, is put
the essential SWT/JFace libraries in a folder named lib, right beneath the
project folder.

Other than "go learn Ant," can anyone offer any suggestions about what's
wrong here?

Any/all clues greatly appreciated, thanks!
Re: How to get File, Export Jar to work? [message #85924 is a reply to message #85778] Wed, 13 July 2005 04:50 Go to previous message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

Willy wrote:

> We've gotten Eclipse's "File, Export Jar" function to work OK with
> Eclipse 3.0.x but now I'm stumped. When I try to run the jar, Java
> always gives the message "Could not find the find main class."
>
> Using winzip to peek inside the jar, the main class certainly is in
> there.
>
> The manifest.mf inside of the jar looks like this:
>
> Manifest-Version: 1.0
> Class-Path: lib\org.eclipse.core.runtime_3.1.0.jar lib\org.eclipse.jfa
> ce.text_3.1.0.jar lib\org.eclipse.jface_3.1.0.jar lib\org.eclipse.osg
> i_3.1.0.jar lib\org.eclipse.swt_3.1.0.jar lib\org.eclipse.text_3.1.0.
> jar Main-Class: com.companyname.test.MainWindow
>
> The manifest input file used to generate the jar is a text file that
> doesn't have the line wrap shown above. We made sure the Class-Path
> line is all one line, in case that matters.
>
> What I have done, which has been our practice for some time now, is
> put the essential SWT/JFace libraries in a folder named lib, right
> beneath the project folder.
>
> Other than "go learn Ant," can anyone offer any suggestions about
> what's wrong here?
> Any/all clues greatly appreciated, thanks!
>
Did you create the manifest file manually or do you let the wizard
create it? Note that the manifest has a line length limitation (can't
remember the number but it is smaller than 80).

Dani
Previous Topic:How do I install Eclipse
Next Topic:Display HTML code in the Editor?
Goto Forum:
  


Current Time: Fri Jul 18 05:58:03 EDT 2025

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

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

Back to the top