IMGD 4000 (D 08)

Step-by-Step Instructions
for Preparing Homework Jar File

The following assumes you have installed jME using Eclipse as per the recommended instructions, and that you have created a separate project, named 'chess' for your homework (which 'requires' the jme project). Adjust appropriately if your conditions are different.

Hint: In order to make a self-contained executable jar file, you will need to load all your art assets as resources (e.g., using Class.getResource()), which basically means putting them on your classpath. If you are not familiar with the general concept of resource loading in Java, here's a good tutorial article.

Don't forget to update your javadoc (Project>Generate Javadoc) and toplevel README.txt file before creating a jar file!

PART A: INITIAL SETUP (Only Done Once)

  1. Create a new folder named 'turnin' at toplevel in your homework project (subfolder of 'chess'):

  2. Create a template manifest file in the turnin folder:

  3. Add the following three lines to the manifest file:

           Manifest-Version: 1.0
           Class-Path: ../../jme/bin/ ../../jme/lib/lwjgl.jar
           Main-Class: mypkg/MyClass 
    Where 'mypkg/MyClass' is replaced by the fully-qualified name of your main class (using slashes instead of dots).

  4. Export your homework project as a jar file in the turnin folder:

  5. Verify that the jar file is runnable:

  6. Upload the jar file (only) via Web Turn-In.

PART B: TO CREATE NEW JAR FILE EACH TIME