Java Layers Installation Instructions
Java Layers Home

JL Download

Installation Notes

Release Notes

Quick Reference

Code Generation


Short Version

  1. Unzip the archive into an empty directory preserving path names.  The JL installation directory is typically named "jl".
  2. Put the JL installation directory on the CLASSPATH.
  3. Make sure your Java compiler (e.g., javac) is on the PATH.
  4. Type "java jlc" to see the JL compiler help message.


Java Layers zip files are label with a release number followed by a content description.  Archives labeled "src-bin" contain the JL compiler source and class files; archives labeled "bin" contain only the class files.  

Java Layers is written completely in Java, with the exception of some test scripts written as Windows batch files.  I apologize in advance for using only Windows examples in these instructions even though JL will work on any system that supports Java.  

Unpacking the Archive

Create a directory named "jl" or a name of your choosing.  If such a directory already exists, it should be empty.  Use your favorite unzipping utility to extract all files in the JL archive file into the above directory, preserving path names.

Setting Up the Environment 

  1. The JL installation directory should be listed on the CLASSPATH.  

    For example, on Windows the set command can be used from the command line to set the CLASSPATH environment variable to include the JL installation directory.  If JL was installed in the C:\jl directory, then the set command can be used to assign the CLASSPATH variable the following value:

  2. The Java compiler should be accessible from the PATH.

    JL is a source-to-source compiler that translates JL source code into Java source code and then invokes a standard Java compiler to generate bytecode.  JL uses the Runtime.exec() call to invoke the Java compiler, which is named "javac" by default.  The default Java compiler is expected to behave like Sun's SDK 1.3 javac.  

    The default Java compiler invocation behavior can be modified, click here to find out how. 

Testing the Environment 

To test that the JL compiler can be easily invoked, type in "java jlc" on a command line.  The JL compiler options will be listed.

To test that the javac compiler can be invoked by JL, make the test subdirectory in the JL installation directory the current directory.  Enter "java jlc TestDummy.jl" to compile the TestDummy.class file. 

For those with the full source code distribution, the JL compiler regression tests (currently automated for Windows only) can be run by making the tests\regress directory in the JL installation directory the current directory.  Type in "runtests" to test the installation; no error messages of any kind should appear.

Invoking the JL Compiler

The JL compiler is named jlc and can be invoked once the environment has been correctly set up by entering:

      java jlc <jlsourcefiles>

where <jlsourcefiles> end in the .jl suffix and contain JL code.  If <jlsourcefiles> is empty, a help screen is displayed. 

Last Modified:  08/24/2001 04:43 PM