Compiling
Compiling in Java involves converting a source file (.java) to a class file (.class).
In order to be able to load your analysis routine or event
generator, you must compile the source file. There are several ways to do this:
- Use the Java Development Kit (JDK) compiler at the command prompt. (You can
donwload the JDK from Sun.)
If my source file is called MyAnalysis.java then typing
javac MyAnalysis.java
at the command prompt will create a file called MyAnalysis.class if there are no syntax
errors in the source file.
- Use the compile button on the toolbar. By default, this
executes the "jikes" compiler, but you can select another compiler by selecting
the 'Compiler' tab on the 'Options' dialog. An
output window will show the compiler's output and return code (
rc=0 normally
indicates successful completion). The advantage of using this option is that you can
edit the source file in the JAS GUI, and when you re-compile, the newly compiled class is
automatically loaded in place of the old one.
- Use an external compiler of your choice.
Return to tutorial.
Page maintained by Jonas Gifford.
Last updated 01/14/04.