Make in Java

Have you ever noticed that there are two kinds of makefiles delivered with Sun's Bean Box? GNU make is used on machines running Unix, and Microsoft's nmake is used on machines running Microsoft Windows. Have you ever wonder if Java could be used to implement a cross platform make utility? Make in Java is that utility.

Make in Java (jmk) is an application which is used to ensure that a set of files is in a consistent state. If jmk detects an inconsistency, it executes commands that correct the inconsistency. jmk is based on the make utility which is part of most Unix systems, but is designed to be easily run on a variety of machines and operating systems.

Make in Java can be run in text mode by a shell. Alternatively, it will create its own graphical user interface. The GUI presents the results of make runs initiated by menu selection or keyboard commands. A makefile can be reloaded by the GUI. The targets of the make can also be changed.

Make in Java is freely redistributable software so that the utility can follow any code that uses it. It should be of interest to any one distributing source code along with automated instructions that describe how to construct the program from the source code.

Installation

The main entry point to jmk is in the class edu.neu.ccs.jmk.Make. Place the JAR file in the class path and start the virtual machine with that class. The JAR file contains scripts for some operating systems that may serve as useful templates.

To test the installation, extract edu/neu/ccs/jmk/makefile.jmk from the JAR file, and move the makefile to your current directory. Start jmk with the command line arguments -w doc. When a window appears, press the key labeled Enter. This makefile target should create javadoc output for Make in Java.

Window appearance preferences can be set by placing the file jmk.properties in the class path.

Hints

The rules given in a jmk makefile can invoke programs as separate processes. To produce a machine independent makefile, a makefile should only exec programs that use the same command line argument syntax across platforms. Examples of such programs include Sun's Java compiler (javac) and their Java Archive Tool (jar).

Notes

Java is a trademark of Sun Microsystems Incorporated.
[Top]
John D. Ramsdell