Project settings

All settings of a project can be altered in the Project Settings Dialog. Select Project | Settings... to open it. The dialog has a couple of section to setup a project.

 

Files and directories

The first section is the Files & directories section. The source directories contain the source files of project. All source files in a mounted directory as well as all source files in all sub directories will belong to the project. If a file is added to one of the project source directories it automatically belongs to the project. The project source files will be compiled by CodeGuide and are used for debugging and code completion if they are also contained in the Project SOURCEPATH hierarchy. You can also add single files to your project.

 

 

 

SOURCEPATH

Note that CodeGuide is package-aware. That means you have to set the Project SOURCEPATH correctly. For example if you have a file "C:\JFCApp\mypackage\Test.java" starting like this:

 

package mypackage;

 

public class Test

{

}

 

Then you have to add "C:\JFCApp" to the Project SOURCEPATH. This is similar to the behavior of the CLASSPATH system variable of Java.

 

 

CLASSPATH

The CLASSPATH contains class files of third party libraries. Directories, .jar files and .zip files can be part of the CLASSPATH. These files are used for execution and source code analysis. You have to add directories to this list which you would normally add to the CLASSPATH environment variable.

 

If the sources of those libraries are available you can add them to SOURCEPATH. Files located in directories which are in the SOURCEPATH list but not in the Files & Directories list will not be compiled but they will be used by the editor for source code analysis showing coding help and compilation.

 

 

Source code analysis

The compilation settings section contains additional options for compilation. Here you can turn on support for JDK 1.4 assert statements or Generic types (JSR 14).

 

 

Sometimes it is necessary to exclude certain directories or files from compilation. For example if you work with CVS you can exclude all directories called CVS by adding "CVS" to the text field called Files and directories excluded from compilation. Multiple entries have to be separated with ";" on Windows and ":" on other operating systems. Afterwards the content of these directories will not be passed to the compiler.

 

f you are developing a web application you should specify the directory where your web application resides in the Web application directory text field. This allows CodeGuide to  properly handle JSP taglibs and JSP include directives.

 

 

Build settings

Here you can choose between the internal build system integrated in CodeGuide and Apache Ant. Using the internal build system is highly recommended because advanced features such as incremental compilation and HotSwap class replacement will only work if the internal build system is used.

 

More information about using Apache Ant can be found in the Using Ant chapter in the Compiling, running and debugging section.

 

Internal Build

Here you can specify multiple compilation rules which will define which files are compiled into which destination directory. Normally the compiled class files will be created in the directories where the corresponding source files are located. You can also specify an extra destination directory where the class file should be created. To do select a destination directory. Using a separate output directory for .class files is recommended for larger projects. The destination may also be a JAR file. You may also compile one source into several destinations if desired.

 

 

 

You can also specify which file types shall be copied from the source directories to the destination directory by CodeGuide. This is for example necessary if your program uses .gif files as resources.

 

 

Execution settings

The most important setting in the execution settings section is the starting point of your project. This starting point is chosen when you run the project. A related option is the type of the starting type. When you choose Application the starting point file must contain a main method which will be executed by a Java VM. When you choose Applet CodeGuide will start an AppletViewer to run your project. In this case the starting point must be an HTML file.

 

 

You can also specify the working directory of your program. The system will change to this directory before your program is run.  And you can specify command-line arguments which will be passed to the main method of an Application.

 

There are also some advanced settings that can be changed.

 

 

You can specify the initial heap size and the maximum heap size in MB. For example enter 16 if you want the heap to be 16MB large.

 

The text field VM command-line options enables you to pass additional arguments to the VM. Note that these are not passed to your application.

 

The options Java 2 Runtime VM and Java 2 Debug VM allow you to specify which VM should be used when running or debugging. You can specify to use the Classic, Hotspot, Server or Default VM. Normally you do not need to change these settings.

 

Optionally a web browser can be started pointing to a specific URL some time after application startup. This can be used to conveniently start browsing at the entry point of a web application once the Servlet engine has been started. The delay until the browser starts is configurable.