JavaJournal January 22, 2000
this is the Java Application I submitted to the JavaWorld CodeMasters contest in December...

Or read some old issues

WordFind applet

IO, IO... January 15

Create your own Swing Wizard... January 30

French Roast - Java IDE

French Roast is a utility that hosts a series of Java files in a Tree view, enabling compiling, running and javadocing a series of files. It isn't JBuilder or Visual Age, but I have used it successfully to compile the Java Debug API classes when Visual Age wouldn't load past 750 classes. (I use the Visual Age Entry edition at home, which has a limit of 750 classes.)

French Roast opens with the Application object loaded in a JTree. The user can select the Application Object and start adding things to it.

In French Roast, all objects in the Project tree must be selected first, then right-clicked. If you remember nothing else, just try right clicking.


Features
  • Objects currently supported in the Project Tree: Application, Project, JavaPackage, JavaFile. Some of the command sets for Application are available from the menu bar.
  • Save Project, with autosave feature. If you forget to save, then the application will save it to DEFAULT.JPF in your default directory. If you have saved once, the application will save to this file on exit.
  • Many variables read from a properties file, application.properties, in your default directory.
  • Support for viewing/editing with your favorite editor. You can add the following line to the application.properties file:
    editor=write.exe
    indicating the executable for the editor. Without this line, the default viewer loads.
  • Compile all files in a project or package.
  • Compile one or more selected JavaFiles.
  • Run the selected file.
  • Generate docs, using javadoc, on one, several selected or all files in the project.
  • Displays a different icon for JavaFiles that need compiling. For this version, that means the .java and .class file must be in the same directory (sorry... this app had to be written in 4 weeks.)
  • Add or Remove files from the project. If you add a package, all Java files in the package directory will be added. The name of the package will be read from source code in one of the Java files.
    Setting up French Roast
    Although the application will work without these settings, you can modify several properties to use an alternate java compiler or a launcher like oldJava or appletViewer. These are the settings:
    compiler=javac
    runner=java
    documenter=javadoc
    You may also specify paths here if required. In this case, please use a notation like:
    runner=d\:\\jdk1.2.2\\bin\\java

    Launching French Roast
    To ensure that the application can read from its properties files, you need to launch from the directory where application.properties resides. The application will work without finding these properties, but user variables will not be read in. This should be done by using a batch file in NT or Windows 95/98.


    Working with FrenchRoast
    Many of the commands that you normally type at a command prompt are viewable in the Console window. You should see a display like this:
    *******************
    Sat Jan 01 20:17:27 GMT-06:00 2000
    Executing java...
    >>d:/jdk1.2.2/bin/java -classpath d:\jdk1.2.2\jre\lib\rt.jar;d:\temp Hello
    SUCCESS:


    The above is a message contains the command line you are preparing through FrenchRoast. In this case, things worked out. However, below you'll see what happens when you have an error:
    *******************
    Sat Jan 01 20:21:35 GMT-06:00 2000
    Executing java...
    >>d:/jdk1.2.2/bin/java -classpath d:\jdk1.2.2\jre\lib\rt.jar Hello
    ERROR:
    java.lang.NoClassDefFoundError: Hello
    Exception in thread "main"


    In the above case, the classpath was incomplete. (You can set the classpath in the Project popup.)
    Known issues
  • Multi select options from the File dialog does not work. This is a documented Swing problem.
  • No way to kill orphaned threads. FrenchRoast does not register and allow the user to kill threads launched during running or compiling. This is particularly a problem if launching classes that crash or JFrame apps that hide themselves without shutting down.
  • No specific support for Appletviewer. You need to modify the RUNNER variable in the properties file to use Appletviewer instead of java.
  • No specific flags for javadoc. Only the default is supported.
  • Modifying the Project, Package and JavaFile objects may prevent previous projects from opening, since the Save format is a Java serialized object. Due to deadline, there was no time to mess with serialver.


    Any questions, please contact me ggallant@bigfoot.com .
    Download
    You can download both source and class files.

    Copyright (c) Gervase Gallant 1999,2000.