Graphical User Interface Instructions

The graphical interface is Java/Swing code that will work on any Java platform. It makes the most sense in a graphical environment such as MacOSX where these screenshots were made. The Make and Ant interfaces are more convenient for command line environments. Eclipse integration is under development.

The GUI consists of two panes for controlling the precomple and compile phases and a Run pane for examing the run-time log. Each pane contains a Save button for saving configuration changes into a file and a Run button for launching a run with the current configuration.

Precompiler Settings Pane

Type java+.sh -gui to launch the GUI with default settings or click the Java+ application icon (Java+.app). The settings file (build.java+ in the java+ install directory) defines the settings shown in these screenshots. To launch the gui with a pre-existing settings file, type java+.sh -gui settingsFileName. All relative pathnames (paths that don't begin with '/') are relative to the directory from which the settings file was loaded. If this directory is not known, the Run button will be greyed out. To enable it, use the Save button to save your settings in a file.

File Optionsj
Note: The striped background (Apple's "corduroy") is common to all platforms. Swing's default grey is so dark that I can't read it so the background is displayed by a custom Pane superclass.

This tab specifies the project environment. The first row sets the source directory (srcDir) and file suffix. The next two define dstDir and binDir. Typically, the sources would be in the same directory, so srdDir would be src and the output directories would be build/dst and build/bin. The deeper nesting shown here results from keeping platform-independent code in the java+ subdirectory on Mac OSX.

src (Source)
The first column specifies that all files in the src directory (and subdirectories) that the suffix ".java" are to be precompiled into corresponding subdirectories of the destination directory specified below
dst (Destination)
The destination directory (first column) and file suffix (second column) for java source files emitted by the precompiler.
bin (Binary)
Everything but java source files in the src directory (except those addressed by the Skip entries below) will be copied verbatim to corresponding subdirectories of the binary directory. The binary directory will also be used the compiler output directory (see the next screen), so both .class files and resource files will be combined in the jar.
skip (CVS, .bak)
The last three rows specify directories and files to be skipped. Directories with the names in the first column, and files with the suffixes in the second column, will be ommitted from consideration. In this example, CVS directories and backup (.bak) files will be skipped.
Open, Close, Bundle
The Open and Close boxes specify the opening and closing digraph pairs. The Bundle checkbook determines whether the precompiler will process Java+ strings to plain Java strings (unchecked) or convert them to entries in resource bundle files (checked). If the latter, the final box provides the name of a java variable that is not otherwise used in your program (default "bndl"). The precompiler will define a variable by this name, initialize it to the ResourceBundle instance for this class, and convert Java+ strings by referencing this variable name.
Verbose, Debug, Force
The Verbose and Debug switches control the amount of output that will be generated at compile time. The Force flag determines whether or not input files whose outputs are up to date should be skipped.

Compiler Settings Pane

Compile Options

The Compiler Settings tab controls the compiler.

-optionName
Javac and jikes take many rarely-needed option. They are labeled according to the jikes and javac documentation. Colons are optional in the -classpath, -bootclasspath and -exdirs boxes; they will be added as required.
Compile with jikes/javac
The checkbox determines whether the GUI should launch the compiler to compile .java files that were changed during this run, and if so, which compiler should be used.

Log Pane

Execution Log

The top line of the window will show "Unspecified project" and the Run bottom will be greyed out if you launched the GUI with java+ -gui (i.e. without specifying a properties file as java+ -gui myProjectFile.java+). The same is true if the New or Close menus are used until the edited settings have been saved in a file. To enable the Run button, save the settings at the top level of your project directory (i.e. the directory relative to which your srdDir, binDir, and binDir were specified). To launch the GUI with saved settings, click the settings file (Macintosh) or type java+ -gui myProjectFile.java+ on the command line.

The Run button initiates a compilation. A log of the results are reported in the Compiler Results tab and sucess or failure indication in the bottom row.

In the example shown here, the Force flag was set in the Precompiler Settings Tab, so all src files are preprocessed and compiled during each run and none were skipped for being up to date. If the Force flag is off, only output files that are out of date with respect to their source are preprocessed and compiled and the others will be counted as "upToDate".



Java+ Version 2.0 © Copyright 2003 by Brad Cox 12 Dec 2003
Served by John Companies, Inc.