Trolltech Home | Qt-jambi-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-jambi-interest Archive, September 2007
JAR Export Problem


Message 1 in thread

I want to export a QTJambi project as a jar-file with eclipse. If I  have 
done this and want to open the exported jar-file I get following  error:
 
Could not find the main class. Program will exit. 
 
How can I make jar-files  runable?



   

Message 2 in thread

Do you have created a META-INF directory with a MANIFEST.MF file in your jar 
file ?

A link : 
http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.html

Regards.
Paul.

Le Sunday 02 September 2007 12:50:07 UmbalaJumba@xxxxxxx, vous avez ÃcritÂ:
> I want to export a QTJambi project as a jar-file with eclipse. If I  have
> done this and want to open the exported jar-file I get following  error:
>
> Could not find the main class. Program will exit.
>
> How can I make jar-files  runable?



Message 3 in thread

On Sun, 02 Sep 2007 12:50:07 +0200, <UmbalaJumba@xxxxxxx> wrote:

> I want to export a QTJambi project as a jar-file with eclipse. If I  have
> done this and want to open the exported jar-file I get following  error:
> Could not find the main class. Program will exit.
> How can I make jar-files  runable?
>
>
>
>


You should try the fatjar plugin for eclipse : http://fjep.sourceforge.net/
Don't forget to setup the main class !

Ludovic Marcé


Message 4 in thread

> Do you have created a META-INF directory with a MANIFEST.MF file in  your 
jar 
> file ?
> 
> A link : 
> 
_http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.html_ 
(http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.html) 
>  
> Regards.
> Paul.
> 
 
Yes Eclipse creates an Manifest.mf automaticly when you export es JAR, but  
it doesn't work. I have opened it with an editor. In my Project I have a 
package  named test and tha class where the main-function is named Gui and in the  
Manifest.mf is the entry test.Gui . Why it doesn't  work?



   

Message 5 in thread

Hello,

Post the content of the manifest.mf and ensure this file is located in a 
directory named META-INF in the archive

Regards,
Paul.



Le Sunday 02 September 2007 16:04:34 UmbalaJumba@xxxxxxx, vous avez ÃcritÂ:
> > Do you have created a META-INF directory with a MANIFEST.MF file in  your
>
> jar
>
> > file ?
> >
> > A link :
>
> _http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.ht
>ml_
> (http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.ht
>ml)
>
> > Regards.
> > Paul.
>
> Yes Eclipse creates an Manifest.mf automaticly when you export es JAR, but
> it doesn't work. I have opened it with an editor. In my Project I have a
> package  named test and tha class where the main-function is named Gui and
> in the Manifest.mf is the entry test.Gui . Why it doesn't  work?



Message 6 in thread

On Mon, 03 Sep 2007 17:22:03 +0200, <UmbalaJumba@xxxxxxx> wrote:

> Hello,
> I have installed the FatJar-plugin for eclipse. If I want export with   
> fatjar
> there is an inputfield with the label classpath (after the Main-Class
> input-field), which content must be written in this  field?
>
>

Open the MainClass dialog button, and choose your class which contains the  
main(String[] args) method.

-- Ludovic Marcé