wiki:JorisLog/2010/12/06

Version 5 (modified by jlops, 14 years ago) (diff)

--

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

Attachments (1)

Download all attachments as: .zip