|
Re: How to add "Class-Path: ." to MANIFEST.MF when generating jar from Eclipse? [message #522262 is a reply to message #522144] |
Sun, 21 March 2010 17:53  |
Eclipse User |
|
|
|
The current jar file is automatically added to the classpath when you execute a java application from a Jar file. If you execute it using "java -jar" you must select a class to be executed (the one that has the main(String[]) method). You can do that in the export jar screen, in the last screen of the wizard (JAR Manifest Specification). There is an option in the last part of it: "Main class:"
Just click "Browse..." beside it and select the class you want.
After that Eclipse will automatically add the following line into the generated manifest file:
Main-Class: my.executable.Class
If that is not what you want, you can create your own manifest file and select it in the same screen in the wizard, selecting the option:
Use existing manifest from workspace
And selecting your manifest file.
|
|
|
Powered by
FUDForum. Page generated in 0.06753 seconds