Compile, Compile all, Output window, Run, StdIO windowIII. User's Guide for Compiling & RuningIII.1 CompileUser can start compiling from Xelfi menu (Run/Compile class) or by clicking on button in Toolbar. The class to be compiled is determined as following: if focused window is an editor or form window, the source for that class is compiled. If not then all selected classes from Class browser are compiled. If some class is compiled many times than better way to do it is set main class in Options - Run tab and than compile using command compile main class (Run/Compile main class). Xelfi environment can use two types of compiler - internal and external. User can celect type of compiler in Options - Compile tab. If user chooses internal compiler classes from sun.tools.javac and sun.tools.java packages will be used for compilation. This setting can be used only if the user has this packages installed. With internal compiler user can use the error highlighting. When external compiler is selected each request for compilation of a class results in creating a new process with external compiler. This setting should be used if the user can't use internal compiler and has got some other java compiler instead. The path to the external compiler must be specified. In this case the error highlighting will not work. III.2 Compile allResult of Compile all command depends on Options - Compiler tab settings. If compile opened documents is selected all opened editor windows and form windows will be compiled. Another possibility is compile the package list which compiles all class sources found in packages from the package list. The last possibility is compile all classpath except the package list that compiles all class sources found in the whole classpath except packages from the package list. In either case the package list can be selected as recursive or not what means that a packages will be compiled or will not be compiled with their subpackages. To edit package list user must press the edit package list button.Note: compiler always checkes date of the source file and compiled file, and will compile a source only if it is newer then the compiled file. III.3 Output window and Error highlightingOutput from the compilation goes to the Output window. If the internal compiler is used the output text is parsed first. In this case the user can select the error line in the Output window (by double-clicking or pressing enter on the line). As a response editor window with the source text scrolled at the proper position appears and the line with an error is highlighted(see color settings). Then user can go through errors by key shortcuts in the editor or by arrow keys in the Output window. In either case proper line with the error is scrolled both in editor and in the Output window. This feature is called Error highlighting. When user starts editing the error line in the editor highlighting disappears. III.4 RunXelfi executes java classes and aplets in an external java interpreter. The path to the interpreter and name of the main class can be set in the Options - Run tab. User can use command Run class from menu (Run/Run class) or from Toolbar. Then the class to run is determined the same way as in the Compile class item. When command Run main class is called the main class from Options - Run tab is executed. When the class to run is applet (this class must extend java.applet.Applet class) user can use command Run as applet from menu (Run/Run as applet). Then the class is determined the same way as in the Compile class item too. The default xelfi simple applet viewer will be used as a frame for the applet and external java interpreter executes it. III.5 StdIO windowWhen running a class Xelfi may show special window for watching its output and for entering its input. In another case output from the running class will be sent to the Xelfi standart output. Appearance of Input output window is enabled in Options - Run tab. Standard output and Error output may be shown separatly in two text areas or together in one text area. In Options - Run tab you may enabled appearance of Standart input input line too. ![]() ![]() ![]() |