O'Reilly logo

Killer Game Programming in Java by Andrew Davison

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A JWS Installer for Checkers3D

I'll go through the six installer development steps again, this time for the Checkers3D application. Checkers3D was the first Java 3D example considered in Chapter 15.

The JWS portal page

Figure B-9. The JWS portal page

Write the Application

Checkers3D uses the OpenGL Windows version of Java 3D, and so requires:

j3daudio.jar

j3dcore.jar

j3dutils.jar

vecmath.jar

JAR files

J3D.dll

j3daudio.dll

J3DUtils.dll

Native libraries

They must be copied into the Checkers3D/ directory, resulting in Figure B-10.

The compileChk.bat batch file contains this line:

    javac -classpath "%CLASSPATH%;vecmath.jar;j3daudio.jar;
                             j3dcore.jar;j3dutils.jar" *.java

The Checkers3D.bat batch file has this:

    java -cp "%CLASSPATH%;vecmath.jar;j3daudio.jar;
                         j3dcore.jar;j3dutils.jar" Checkers3D
The initial Checker3D/ directory

Figure B-10. The initial Checker3D/ directory

Once the program has been tested, the application should be packaged as a JAR. The makeJar.bat batch file has this line to handle that:

    jar cvmf mainClass.txt Checkers3D.jar *.class

The manifest details in mainClass.txt are:

    Main-Class: Checkers3D
    Class-Path: vecmath.jar j3daudio.jar j3dcore.jar j3dutils.jar

The application now consists of eight files:

  • The application JAR file: Checkers3D.jar

  • Four Java 3D JAR files: j3daudio.jar, j3dcore.jar, j3dutils.jar, and vecmath.jar

  • Three native ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required