Skip to content.

Creating mbat.jar

This section gives instructions on how to create the mbat.jar application file using Eclipse. The Ant build file used in these instructions is located at:

  • mbat/src/build.xml

  1. Install build_fat_jar plugin for Eclipse:
  2. To create the mbat.jar:
    1. Auto-create net.nbirn.mbat.about.BuildInfo.java to update the build info using Ant script (Note, the script uses the command line svn client, see svn+ssh command line setup).
      1. Open build.xml in Eclipse (select in Package Explorer and double-click)
      2. Run the svnrevision2java target (in the Outline view, right click the target and select "Run As"->"Ant Build".
    2. Refresh (F5) the mbat project (should automatically rebuild to update the BuildInfo.java class)
    3. Create the .jar file using "Fat Jar"
      1. Right-click on the mbat project, select "Build Fat Jar", and configure the build:

      2. Select the files to include. Note, although the mbXXX libraries are duplicated, the jar file sometimes does not run properly if all them are not selected. For the 3rd party .jar files, only included those that are referenced [TODO: cleanup unused jars].

    4. [Optional] Copy the contents of the dist folder to the install4J folder.
      1. Run the install4J target (Note, you will need to edit the todir location appropriately)


DarenLee? - 15 Oct 2008