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.

Incompatibility Notice

Version 1.0 and above use semicolon as the generic path separator character, while earlier versions used colon. Semicolon was adopted so as to allow the use of colon in a file name. Old makefiles that use generic path lists must be modified to reflect this change.


If your Java virual machine accepts the -jar option, you can run jmk with the command:

java -jar jmk.jar [ options ] [ target ]*

The main entry point to jmk is in the class edu.neu.ccs.jmk.Make. If your Java virual machine does not accept the -jar option, 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 with JDK 1.2, extract the contents of the JAR file into an inferior directory and change to the directory. Start jmk with the command

java -jar ../jmk.jar -f edu/neu/ccs/jmk/makefile.jmk

This should create jmk.jar from its sources.

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


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).


Olivier Refalo contributed the entire Swing graphical interface. Use the -s option to view it.


Java is a trademark of Sun Microsystems Incorporated.


John D. Ramsdell