Avatar billede fredand Forsker
01. december 2007 - 14:41 Der er 2 kommentarer og
1 løsning

How to export a Java Project to a executable jar in Eclipse?

Hello!

I have a small program that I exported into a jar in eclipse. Eclipse created the META-INF and the manifest.mf file as well.

But I did not got the cjhance to add this line i my manifest.mf:
Main-Class: myproject.MyClass

Is there a way to configure Eclipse letting me do this so the jar gets executable right a way?

Now I need to extract the manifets file and add it to the jar afterwards outside Eclipse.

Btw I use Eclipse Classic 3.3.1.1 in Linux.

Best regards
Fredrik
Avatar billede arne_v Ekspert
01. december 2007 - 22:01 #1
When you export to the jar file then in page 3 (Jar Manifest Specification) you move the mark
from "Generate the manifest file" to "Use existing manifest from workspace".

You will of course need to have created the manifest first.
Avatar billede fredand Forsker
02. december 2007 - 10:28 #2
Hello!

Thanks alot!
you solved my problem!

Please give a svar so I can reward you.

Best regards
Fredrik
Avatar billede arne_v Ekspert
02. december 2007 - 16:10 #3
answer
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester