Making a jar file from a project instead of a war. The problem with a war file is that it's not allowed to execute main functions.
To solve that problem one has to make a jar instead, but what if you're project in your favorite IDE already creates a war.
Solution:
- make an ant script that creates a jar (see attachment)
- execute: ant -f buildJar.xml jar
- to start a program, execute the following command:
- java -cp jarfile.jar:lib javamainfunctionclass
- for example:
- java -cp molgenis_distro.jar:lib handwritten.importers.Start
Last modified 14 years ago
Last modified on 2010-12-06T13:05:19+01:00
Attachments (1)
- buildJar.xml (2.8 KB) - added by 14 years ago.
Download all attachments as: .zip