FreeJava Version 1.0 , 5 October 1998


Copyright (c)David Mold 1998

CONTENTS

Part I - Getting Started

  1. WHAT IS FREEJAVA?
  2. FEATURES
  3. WHAT'S MISSING?
  4. INSTALLATION

Part II - Using FreeJava

  1. STARTING A NEW PROJECT - APPLETS
  2. STARTING AN APPLICATION PROJECT
  3. CREATING A PROJECT FROM EXISTING SOURCE CODE
  4. DROP-DOWN FUNCTION LIST
  5. PROCESS OUTPUT WINDOW

For more information visit the FreeJava web site at http://www.damold.dircon.co.uk/freejava/


PART I - GETTING STARTED

1. WHAT IS FREEJAVA?

FreeJava is an integrated development environment for Java programmers. It uses the tools available in the JDK (Version 1.1.x) from JavaSoft, but offers a more convenient Windows-based front end to the compiler, applet runner and runtime module supplied.

FreeJava was developed to let people take advantage of the fact that the JDK is free, and to encourage use of cross-platform, 100% Java available in Sun's free tools. For more information and a free download of these tools, please visit http://www.javasoft.com

Please note that FreeJava is not developed or endorsed by JavaSoft or Sun Microsystems. Note also that FreeJava is a Win32 application and is not written in Java. It will run only on Microsoft Windows 95/98/NT platforms.

To compile and run Java programs with FreeJava, you must have a version of the JDK installed and correctly configured on your machine.

2. FEATURES

3. WHAT'S MISSING?

This is version 1 of a free IDE, so I'm afraid there's no support for the JDK debugger yet. If I find enough people asking for it, it will come. FreeJava isn't intended to be industrial strength, but it is intended to be powerful enough for most people, bug-free and a useful tool, so if you find problems, let me know.

4. INSTALLATION

Run Setup.exe to install FreeJava. You can install the program wherever you like on your computer. The only important step once the program is installed is to choose "Preferences..." from the File menu, and enter the path to your installation of the JDK under "JDK Location". For example, on my computer the path is "C:\jdk1.5.1".

Incidentally, this means that FreeJava will also work with any version of the JDK, even future versions, so you don't need to get an update for your IDE every time there's an update for Java.

Back to top

PART II - USING FREEJAVA

1. STARTING A NEW PROJECT - APPLETS

To create a new applet project, click "New Project..." on the Project menu. In the dialog that follows, type in a name for your main applet class, and choose the "Applet Project" radio button. Then click "OK". FreeJava will then automatically generate a Java source file for your applet class, and an HTML file that can be used to launch the applet. You are prompted to save the project, and when you do you should create a new folder for it, since the Java and html source files will be saved in the same folder as the project.

You can then edit the Java file to create your own applet. You can add existing Java code files to the project by choosing "Add Java Source Files..." from the Project menu. Or you can open a Java source file and choose "Add Window to Project" from the Project menu. You can also do this with new Java source files created by choosing "New" from the file menu.

Choose "Compile" from the Project menu to compile the applet, and "Run Applet" to execute the applet with the JDK's applet viewer.

2. STARTING A NEW PROJECT - APPLICATIONS

Follow the same steps as in II.1. above, but instead of choosing "Applet Project" in the New Project dialog, choose "Application Project". FreeJava will generate skeleton code for a GUI Java application. You can compile the application by choosing "Compile" from the Project menu, and run it with "Run". (The reason both "Run" and "Run Applet" area available on the Project menu is so that you can create FreeJava projects that are both applications and applets.

3. CREATING A PROJECT FROM EXISTING SOURCE CODE

Choose "New Project" from the Project menu, but this time choose "Empty Project". You will then be prompted for a place to save your new project. Add your existing files to the project by choosing "Add Java Source Files..." from the Project menu. When you want to compile and run the project, you must first set one of your source files as "Main". In the case of an application, this is the source file that contains the code for the "main" function. In the case of an applet it is the source file containing the code for the Applet-derived class. To do this, select the file in the Project window, and choose "Set as Main" from the Project menu. A small purple M on the file's icon signals its status. You can change which file is set as Main at any time. (When FreeJava runs javac, the Java compiler, it is always set to compile the class that is set as Main with the -depend flag set. In this way, all of the files needed to run the application/applet are compiled, and only those files.)

4. DROP-DOWN FUNCTION LISTS

At the top of each open source code editing window is a drop-down list of all the functions defined in the open file. You can choose any of these functions to go straight to its definition in the source code.

5. THE PROCESS OUTPUT WINDOW

When you compile or run a Java program in FreeJava, all output that would normally go to a DOS mode terminal window is diverted to the process window. If you try to close this window before the process is complete, you will be asked if you want to terminate the process. You may need to do this, for example, if your Java program gets stuck in a loop, or if you have no code to close the main window of an application. Try to use this feature as little as possible, as it may fragment memory. If you single-click the icon on the left end of the Process Window's title bar, you will see menu options to save the content of the window (as a text file), and to set the font used to display the output.

Back to top