Super Prev Next

The JET Control Panel

Excelsior JET Control Panel is a graphical front-end that you use to quickly set up JET project files and compile your Java applications to native code. Its wizard-like interface guides you through the process of JET project creation step-by-step.

Note: Some advanced features are not accessible through the Control Panel. In such case, use the command-line compiler as described in Chapter JC reference.


Super Prev Next

Before you begin

Before using Excelsior JET to compile your Java application to native code, make sure that its bytecode version is present on your system and runs properly on the particular version of the virtual machine which you selected when installing JET.

Important: Ensure that your class files were compiled with optimizations disabled (e.g. the javac option "-O" was not used), otherwise the JET optimizer would become less efficient.


Super Prev Next

Starting Excelsior JET Control Panel

To start the JET Control Panel, type

    LaunchPad

at the command prompt and press Enter.

A splash screen with a “Loading...” progress indicator shall appear. When loading is over, three buttons shall be displayed:

splash


Super Prev Next

JET Control Panel overview

Figure 1. Excelsior JET Control Panel

Excelsior JET user interface is built as a series of “pages”, each representing one logical step in the process of setting up your project. As can be seen on Figure 1. Excelsior JET Control Panel, most of the page space is occupied by page-specific controls, but there are also some common controls: sidebar at the left edge, main menu at the top, and help/navigation buttons in the bottom right corner.

You may iterate through the pages using the Next Page / Previous Page buttons, or go directly to a particular page by either clicking on the respective sidebar button or selecting that page in the Page menu. Depending on the context, some of the pages may be unreachable — their respective sidebar buttons and Main Menu items shall be disabled then.

Online help is available to assist you at any point. To display help information for the current page, click the Page Help button. To get help on a particluar control, click the Context Help button. The mouse cursor shall change shape to an arrow with a question-mark — click the control you want to learn about, and the respective portion of the online help shall display.


Super Prev Next

Working with projects

A JET project consists of a project configuration and a set of files, which together fully determine the final executable produced by the compiler. A project defines:

This information is stored in the project file which you create as described further in this Chapter. JET project files have the extension “.prj”.


Super Prev Next

Creating a new project

You may create a new JET project by either clicking the New button on the JET splash screen, clicking the New sidebar button or by selecting the File/New menu item. This brings up the New page (if there was already an open project, you shall be prompted to save it first.)


Super Prev Next

Opening a project

You may open a previously created project right on JET startup by clicking the Open button on the JET splash screen, or later by selecting the File/Open menu item (if there was already an open project, you shall be prompted to save changes first.) A conventional file dialog shall display. Use it to select the JET project file you want to open.

You may also open project files you created manually for the JET command-line compiler jc. However, the Control Panel only recognizes a subset of the project file syntax (see Project files), so it may refuse to load a project file that uses advanced features, such as preprocessing (see Control file preprocessing.)


Super Prev Next

Saving a project

You save a project by selecting the File/Save item from the Main Menu. When you save a newly created project for the first time, a conventional file dialog is displayed. Use it to specify the directory and name for your project. The default extension “.prj” is added to the file name automatically.

Note that a project is not actually created until you reach Step 3, so the item File/Save is disabled on Steps 1 and 2.


Super Prev Next

Saving a project under a different name

You can save the current project under a different name or into another directory by selecting the File/Save As item from the Main Menu. A conventional file dialog shall display; use it to specify the new directory and/or name for your project.

Note: Saving the project under a different name also changes the name of the generated executable (see Step 6: Specifying target settings.)

A project is not actually created until you reach Step 3, so the item File/Save As is disabled on Steps 1 and 2.


Super Prev Next

Step 1: Creating a new project

This is the first step when creating a new project, where you select the target executable type and choose an application description source.


Super Prev Next

Selecting target executable type

Excelsior JET may create two types of Linux executables:

The project setup procedure is slightly different for each executable type, thus you have to select it at the very beginning. You may change it later by selecting the respecitve item from the Application menu.


Super Prev Next

Choosing application description source

In order to compile your Java application to native code, you have to specify the classes comprising it, resources (images, audio clips, etc.) it uses, system properties, etc., to the Excelsior JET compiler. You may do that manually, but JET is also capable of retrieving the necessary information automatically from the command line of the java launcher or the shell script invoking it.

Click one of the application description sources for automatic information retrieval or click Manual Setting to skip that step.


Super Prev Next

Step 2: Retrieving application description

On this step, you provide the details for the application description source you selected on Step 1. Depending on your selection, one of the two versions of the Source page shall be displayed:

This step is skipped if you select Manual Setting on Step 1.


Super Prev Next

Source: JVM command line

This version of the Source page is displayed if you select JVM command line as the application description source on the New page.

To make JET retrieve the description of your application from its JVM command line, do the following:

  1. If your application needs to be launched from a particular directory, type the full path of that directory (e.g. ~/MyApp) in the Application Directory field, or click the Browse button to select that directory using a file dialog. Otherwise, leave this field blank.
  2. In the Command Line field, type or paste the command line you use to launch your application on the VM, e.g.

        javaw -cp ~/MyLib -Xmx20m -jar MyApp.jar

  3. In the Additional Classpath field, type or paste classpath entries not included in the Java VM command line above but required for your application to work, separated by semicolons. If there are no such entries, leave this field blank. Click the Get $CLASSPATH button to paste the value of the CLASSPATH environment variable into this field.
  4. Click the Next button. Provided you have specified correct values in the entry fields, JET shall now display the Classes page.


Super Prev Next

Source: batch file

This version of the Source page is displayed if you select Batch file as the application description source on the New page.

To make JET retrieve the description of your application from the batch file used to run it on the VM, do the following:

  1. Type the full path of the batch file in the Batch File field or click the Browse button to select it using a conventional file dialog.
  2. Click the Parse It! button. If the button is disabled, you must have mistyped the path of the batch file — check if it exists.
  3. JET shall display the results of batch file parsing in the Parse results box. Verify that all VM parameters have been correctly retrieved and select the Next button. The Classes page shall be displayed.

Note: JET is not capable of correctly parsing batch files in which the JVM launcher java/javaw is invoked using full path, e.g.:

    /usr/java/jdk1.3.1_03/jre/bin/java Main
    $JRE_DIR/bin/java Main

or is not invoked at all (the JVM is launched by an executable that has a different name.)


Super Prev Next

Step 3: Selecting classes to compile

On this step, you define:

The Classpath Entries pane contains a list of archive files and directories from which the JET compiler shall retrieve classes on Step 7. All packages and classes found at those locations are displayed in the Compilable Classes pane to the right.

If you did not skip Step 2, the lists of classpath entries and classes should be prefilled, as well as the main class name. If all those settings appear to be correct, you may safely go to the next step.


Super Prev Next

Working with classpath entries

Classpath entries are disk locations (directories and jar/zip files) containing your application’s classes. When looking for a particular class, JET processes classpath entires in the order in which they appear in the Classpath Entries pane, from top to bottom.

Note: It is therefore important that you place classpath entries in the same order as they are accessed by the virtual machine when it loads your application’s classes /This is the order in which classpath entries appear in the java.class.path system property set by a Java launcher./ . Otherwise, there is a chance that an other than intended version of a particular class shall be read by the JET compiler, in which case the behavior is unpredictable.

You edit the classpath using the pop-up menu displayed when you right click the Classpath Entries pane, or using the five buttons appearing to the left:

Add   Move Up   Toggle Enforcement Status
Remove   Move Down      

To add a classpath entry to the list, do the following:

  1. Click the Add button or right-click anywhere in the Classpath Entries pane and select Add classpath entry from the pop-up menu. A conventional file dialog shall display.
  2. Do one of the following:
  3. If you have selected a jar/zip file, you shall be prompted whether you want to compile all classes from that file. Select Yes if you want the compiler to process all the classes located in that archive, or No if you only want to compile classes that are explicitly imported. You shall be able to toggle this aspect of compiler behavior at a later point (see Working with classes and packages.)

To remove a classpath entry from the list, do the following:

  1. Select the item you want to remove and click the Remove button or right-click the item you want to remove and select Remove classpath entry from the pop-up menu.

    A confirmation box shall appear.

  2. Select Yes to remove the entry or No if you decided to leave it in place.

To change the order of classpath entries, select the item you want to move and click the Move Up / Move Down buttons until the item is properly placed. You may need to do this if there are two or more classes located along the classpath that have exactly the same (full) name See “Duplicated classes” in Project inconsistencies for details.


Super Prev Next

Working with classes and packages

The Compilable Classes pane displays all packages and classes found in directories and jar/zip files listed in the Classpath Entrires pane. You may also display the list of classes and packages found at a particular classpath entry by expanding that entry.

The status of each particular class, or package with respect to whether it shall be compiled is indicated by a color tag displayed to the left of the class or package name:

the class or package is expliciltly included into the compilation set by the user
the class or package is included in the compilation set by import (explicitly included classes depend on it)
the class or package is not included in the compilation set either explicitly or by import
the class file is ignored because a class file with the same name was found earlier in the classpath or because this class belongs to the Java 2 API. See Project inconsistencies for details
the package is partially included in the compilation set

You have to explicitly include at least one class into the compilation set. The main class is included automatically. So in the simplest case you specify the main class and JET adds the remaining classes by scanning import dependencies.

JET is unable to detect classes that are loaded dynamically at run-time. If you know such classes beforehand, force them into the compilation set as described below.

However, your application may also load classes from the network (e.g. in the RMI Distributed Object Model) or even create them at runtime (Dynamic Proxy API) To handle this situation, employ the Mixed Compilation Model.

To force a class into the compilation set or to cancel enforcement, do one of the following:

To force an entire (sub)package into the compilation set or to cancel enforcement of all its classes, do one of the following:

To force all classes found at a particular classpath entry into the compilation set, do one of the following:


Super Prev Next

Specifying the main class

As you know, execution of a Java application starts with a public static void main (String[]) method. However, more than one class may contain such method. When running your program on a JVM, you specify the name of the desired main class to the Java launcher as a command line parameter or in the manifest file of your application’s jar.

Similarly, JET needs to know the name of the main class to make control passed to its main method on application startup. It also traverses the import graph of that class to determine the minimal set of classes that have to be compiled for the application to be successfully linked.

If you did not skip Step 2, JET must have already set the Application Main Class field to a proper value. If you chose Manual Setting and went directly to Step 3, you need to specify the main class yourself. You may also want to switch between the multiple main methods to create different executables from a single project.

To specify the main class, do one of the following:

You do not need to select the main class if you want to make a shared library.


Super Prev Next

Import scanner

Whenever you add, remove, or change relative position of a classpath entry, or mark/unmark classes or packages for explicit inclusion into the compilation set, JET scans the import graph of the whole project, starting from the main class and classes forced into the compilation set, and assigns the imported/omitted/ignored tags to the remaining classes. This is called import scanning.

The import scan cycle for a large project involving thousands of classes takes a considareble amount of time, and automatic scan after each classpath/compilation set change can become annoying. If this is the case, disable automaic import scanning by unchecking the Scan Automatically checkbox. You shall be able to run import scanning manually after making changes to the classpath or the compilation set by clicking the Start button in the Import Scanner pane.

Note: If you have automatic import scanning disabled, run the import scanner before leaving the Classes page to conduct consistency checks.


Super Prev Next

Project inconsistencies

The import scanner is also capable of detecting the following inconsistencies in the project:

If any such inconsistency is detected, the Warnings tab shall appear in the information area at the bottom of the page. Under that tab, the overall numbers are displayed for each type of inconsistency. Click the respective Details button to display a dialog box with a list of classes involved.


Super Prev Next

Duplicated classes

When multiple class files for the given full class name are found along the classpath, the file located in the entry that is closer to the beginning of the classpath prevails. The “overrides” tag is displayed next to the first occurence of such class in the Classpath Entries pane, whereas all other occurences have the “ignored” tag and the “overridden” tag .

To browse the list of duplicated classes, do the following:

  1. Select the Warnings tab.
  2. Click the Details button next to the message “XXX duplicated classes”. A dialog box shall appear.
  3. In the dialog box, expand a class name to view the list of classpath entries where the respective class files were found.
  4. Click Close to close the dialog box.

To resolve this inconsistency, it is sufficient to ensure that the desired versions of class files appear in the compilation set by adjusting the order of classpath entires. You may then remove the overridden class files.


Super Prev Next

Conflicting classes

Any JET-compiled application should use the Java 2 platform classes precompiled during JET installation. Classes coinciding with Java 2 platform classes are displayed with the “ignored” tag and the respective classpath entries and packages are marked with the “conflict” tag in the Classpath Entries pane.

To browse the list of conflicting classes, do the following:

  1. Select the Warnings tab.
  2. Click the Details button next to the message “XXX classes coinciding with Java 2 API classes”. A dialog box shall appear, displaying the list of conflicting classes.
  3. Click Close to close the dialog box.

To resolve this inconsistency, remove all classes coinciding with Java 2 platform classes from the classpath. If such classes appear in third party jars, try enabling the Ignore conflicting classes option on the Options page. See Bytecode consistency checks for more information.


Super Prev Next

Unresolved import

If a class A that is part of the compilation set explicitly imports another class that is not part of the Java 2 API and could not be located along the classpath, the “unresolved import” tag is displayed next to the class A.

To browse the list of classes that have unresolved import dependencies, do the following:

  1. Select the Warnings tab.
  2. Click the Details button next to the message “XXX classes with unresolved import dependencies”. A dialog box shall appear.
  3. Select the Unresolved tab to display the list of classes that have unresolved import. In the list, expand a class name to display imported classes whose class files were not found in the classpath.
  4. Select the Not Found tab to display the list of classes that are imported by classes included in the compilation set, but whose class files were not found in the classpath.
  5. Click Close to close the dialog box.

To resolve this inconsistency, add directories and/or archives containing necessary classes to the classpath. It may happen, however, that this problem is detected in a code that is not under your control, such as a third-party class library or component. In such case, file a complaint to the vendor of that software and specify that class absence should result in a run-time error on the Options page. See Bytecode consistency checks for more information.

JET may correctly handle the situation when an imported class is not present at compile time but becomes available at run time. See Reflective shield for details.


Super Prev Next

Statistics

By clicking the Statistics tab, you display complation set statistics:


Super Prev Next

Step 4: Resources

On this step, you define the resourcepath - a set of directories and jar/zip files where your application’s resources (images, audio clips, property files, etc.) are stored, and specify whether the JET compiler should bind resources and, optionally, classfiles to the resulting executable.


Super Prev Next

Working with the resourcepath

The Resourcepath pane contains the list of all locations (directories and jar/zip files) along the resourcepath, in the order they have to be searched by the application at run time. By default, this list is synchronized with the list of classpath entries you define on Step 3: whenever you add or remove a classpath entry, it is added to or removed from the resourcepath, and the relative order of such entries is preserved. You may also add entries specific to the resourcepath. Entries derived from classpath are displayed in italic.

Two buttons are displayed to the left of the Resourcepath pane:

Add
Remove

To add a resourcepath entry, do the following:

  1. Click the Add button. or right-click anywhere in the Resourcepath pane and select Add resourcepath entry from the pop-up menu. A conventional file dialog shall display.
  2. Choose the directory or the jar file you want to add and click Select.

To remove a resourcepath entry from the list, do the following:

  1. Select the item you want to remove and click the Remove button or right-click the item you want to remove and select Remove resourcepath entry from the pop-up menu.

    A confirmation box shall appear.

  2. Select Yes to remove the entry or No if you decided to leave it in place.

Note: Removing a resourcepath entry that is present in the classpath disables syncronization with the classpath.

To switch sychronization with the classpath on or off, select the Synchronize With Classpath checkbox. If you had removed any resourcepath entires that are present in the classpath, they shall be added back to the resourcepath when synchronization is restored.


Super Prev Next

Resource binding

Excelsior JET is capable of binding Java resources to the resulting executable, much like it is done when programming native Windows applications. This allows you to transform your application’s jars into a single self-contained executable.

A status tag is displayed before each resourcepath entry, indicating the way it shall be handled by the compiler:

The entry is left intact by the compiler. This is the only option for resourcepath entries that are directories.
Resources are bound to the resulting executable, class files are filtered out. This is the default for jar/zip files
The entire jar/zip file, including class files, is bound to the resulting executable. Presence of the original class files at runtime is required by some APIs, such as Java Crypto Extension. You may also wish to use the Mixed Compilation Model to compile some classes at run time.

To switch resource handling for a particular resourcepath entry, do one of the following:

See also Resource binding.


Super Prev Next

Step 5: Setting compiler options

On this step, you specify options that control various aspects of behavior of both the JET compiler and the resulting application.


Super Prev Next

Bytecode consistency checks

This set of options controls how the compiler treats bytecode inconsistencies, such as absence of an explicitly imported class. By default, they result in compilation errors. However, when an inconsistency is detected in bytecode that is not under your control, such as a third-party class library, you usually do not have a chance to remedy it quickly. If you encounter such problem, contact the vendor who supplied the inconsistent bytecode, and toggle the respecitve JET options to make the compiler treat bytecode inconsistencies as warnings:

See Bytecode consistency checks for details.


Super Prev Next

Assertions

By default, JET does not produce code for assertion statements, because generation of that code has negative impact on application performance and footprint. If you need assertions to be present in the resulting executable, check the Generate asserts box.

See Assertions for information on how to enable assertions at run time.

Note: Assertions were first introduced in J2SE 1.4.0, so if the active profile (see Profiles) includes JRE version 1.3.x, the Generate asserts box is not displayed.


Super Prev Next

Compiler memory usage

Just like a Java application, the JET compiler uses garbage collection to reclaim memory /Although the compiler is written in a language other than Java./ . It may therefore be necessary, for optimum performance of the compiler, to adjust the maximum amount of memory that it is allowed to use.

To specify the maximum amount of memory JET may use when compiling your application, type it into the Compiler Heap field or drag the slider below. You may use suffixes “K” and “M” to denote kilobytes and megabytes respectively.

Note: If the entered value is too small or too large, the warning icon is displayed on the right of the field until you correct the value appropriately.

You have to increase this setting, if you get the "out of memory" (F950) message. See Correcting build errors for more information.

Vice versa, intensive page file access during compilation indicates that the compiler heap size setting is too large for your system configuration.

You may also let the compiler determine the proper heap size dynamically at run time. To do that, drag the slider to the leftmost position until the word “Adaptive” is displayed in the Compiler Heap field. Please note, however, that in this mode the compiler shall under nocircumstances use more memory than the amount of available physical memory, so using adaptive compiler heap is not recommended on low-end systems.

See Compiler memory usage for more information.


Super Prev Next

Application memory settings


Super Prev Next

Heap size

By default, the Java VM uses certain heuristics at run time to determine the maximum amount of memory the application is allowed to allocate without garbage collection, depending on the system load. You may also specify that amount explicitly using the -Xmx parameter of a JVM launcher. Using heuristics is the default in JET-compiled applications as well, unless the -Xmx parameter was specified in the application description source. You may adjust this setting or revert to the default behavior at any time.

To specify the maximum amount of heap memory your application should be allowed to allocate at run time, type it into the Heap Size field or drag the slider below. You may use suffixes “K” and “M” to denote kilobytes and megabytes respectively.

Note: If the entered value is too small or too large, the warning icon is displayed on the right of the field until you correct the value appropriately.

To return to the default behavior, drag the slider to the leftmost position. The word “Adaptive” shall be displayed in the Heap Size field.

See Application memory usage tuning for more information.


Super Prev Next

Stack size

The default thread stack growth limit in a JET-compiled application is one megabyte, unless it was overridden using the -Xss Java launcher parameter in the application description source.

You may need to increase the stack limit if your program employs highly recursive algorithms, or reduce it if your program needs to run lots of threads simultaneously (see Number of threads for more information.)

To specify the maximum thread stack size for your application, type it into the Stack Heap Size field or drag the slider below. You may use suffixes “K” and “M” to denote kilobytes and megabytes respectively. The value you enter is rounded up to a multiple of 4 KB.

Note: If the entered value is too small or too large, the warning icon is displayed on the right of the field until you correct the value appropriately.


Super Prev Next

Optimizations

For the sake of reliability, the JET compiler always has all optimizations enabled by default and most of them cannot be disabled at all. There are just two exceptions: allocation of objects on the stack, which may reduce scalability, and inline method expansion, which improves performance but also increases code size. You therefore have an option to disable stack allocation and adjust the criteria for inlining.


Super Prev Next

Allocating objects on the stack

As you know, the Java memory model has no stack objects — class instances put on the stack frame. All objects have to be allocated on the heap by the new operator and destroyed by the garbage collector, even though the lifetimes of some objects are obvious. The JET compiler performs so called escape analysis to approximate object lifetimes and allocate some objects and small arrays on the stack where possible. As a result, compiled applications benefit from both faster object allocation and less intensive garbage collection.

Enabling this optimization may however negatively affect your program’s scalability. If you are compiling a server-side Java application that may need to run thousands of threads simulatenously, disable this optimization by unchecking the Allocate objects on the stack box.


Super Prev Next

Inline method expansion

The JET compiler is capable of replacing calls of methods with their bodies when the method to be called at run time may be exactly determined at compile time. This optimization is called inline method expansion; small methods, such as get/set methods, especially benefit from it. The other side of the coin is that inline expansion increases code size and may in fact worsen performance if the resulting methods are too large.

To control the aggresiveness of this optimization or turn it off completely, select the desired level from the Inline expansion list, or select OFF to disable inlining.


Super Prev Next

Mixed Compilation Model

Excelsior JET supports Mixed Compilation Model, which allows your JET-compiled application to load and use classes that were unknown at compile time.

This feature is implemented through provision of a Caching JIT compiler that you may redistribute with your application.

Please read Chapter Mixed compilation model that contains detailed information about the Mixed Model before using it.

The Mixed Compilation Model is disabled by default. To enable it, do the following:

  1. In the JIT compilation mode combo box, select the desired JIT compiler: Fast or Optimizing. See JIT compiler selection for details.
  2. Select the JIT Caching mode:

Note: The optimizing JIT compiler and the JIT Caching Technology are available in the Professional Edition only.


Super Prev Next

Step 6: Specifying target settings

On this step, you specify settings for the executable to be produced by the compiler, and Java system properties required by your application, if any.


Super Prev Next

Executable file settings

To specify the target executable settings, do the following:

  1. In the Project Directory field, type the full path to the directory in which you would like the JET compiler to place the resulting executable, or click the button on the right and select that directory using a conventional file dialog.

    Note: JET will save the project file into this directory and store compiler output files in subdirectories of that directory, automatically created during compilation.

  2. In the Executable Name field, type the desired name of the executable.

    Note: This will also be the name of the project file.

  3. If you application requires printing stack trace of Java exceptions thrown, select an appropriate stack trace mode in the Miscellaneous pane. The options are trade-off between availability of full stack trace information such as line numbers and the size of the resulting executable. For details, see Stack trace.


Super Prev Next

Runtime library selection

Professional Edition only:

In the Runtime pane, you may select a particular version of the JET runtime system that will serve the compiled executable. Different runtimes are available, optimized for certain hardware and application types. You may freely use any of them for development, however, production and redistribution uses of some runtimes requires payment of a runtime license fee. See Runtime Selection for a detailed description of Excelsior JET runtime flavors.


Super Prev Next

System properties

To specify Java system properties required by your application (those passed to the Java launcher using “-D” options), type them in the entry field from the Java System Properties pane, one on a line.

For instance, if you run your application on a JVM as

    java -Dmyapp.debug -Dmyapp.log=/var/log/myapp MyApp

type the following in the field:

    myapp.debug
    myapp.log=/var/log/myapp

Note: If you opted for a description source other than Manual Settings, JET should have retrieved the properties automatically.


Super Prev Next

Step 7: Compiling your application

On this step, JET compiles your application to native code and produces a conventional Linuxexecutable. You can invoke the compiler right from the JET Control Panel, to receive assistance in correcting possible project misconfigurations, or create a build script for use with the jc command-line compiler.


Super Prev Next

Building the executable

To initiate the executable build process, click Build. JET shall first check the project for consistency (see Remedying project consistency flaws). If there are no consistency flaws, the Control Panel shall invoke the jc compiler. The status area and the progress indicator at the top shall start updating, informing you about the build progress, and compiler’s output shall be displayed under the Full Log tab.

If everything goes well, a message box shall inform you that the build process is over and you may now run your compiled application to test how it works. You may do that by clicking Run or by launching the run_target-name script created by JET in the target directory you specified on Step 6. Later, if you make any changes to your application’s class files, you may rebuild the executable from the command-line by launching the build_target-name script from the same directory.

See also Remedying project consistency flaws and Correcting build errors.


Super Prev Next

Creating files for the command-line compiler

If you want to run jc outside the JET Control Panel (e.g. to make more memory available for compilation or to use jc from a makefile or a build script), click Create Control Files. JET shall create shell scripts build_target-name and run_target-name in the target directory you specified on Step 6. Use them to build and run your application’s executable respectively.

See also Remedying project consistency flaws.


Super Prev Next

Remedying project consistency flaws

When you click Build or Create Control Files, JET first checks the project for consistency. If it encounters a problem, one of the following messages shall display:

Superfluous compiler heap

Reason: Compiler heap setting exceeds the amount of available memory. It may lead to excess memory paging and significant slowdown of the compilation.

Resolution:

  1. Close all applications you do not need at the moment.
  2. Set compiler heap size to zero or to 70–90 percent of the amount of available physical memory (displayed right in this dialog).
  3. Click Proceed
Save as dialog

Reason: You did not save a newly created project and did not specify the project directory.

Resolution: Do one of the following:

Classpath is empty

Reason: There are no entries in the classpath, so there are no classes to compile.

Resolution: Return to the Classes page, and add some entries to the classpath as described in Working with classpath entries.

Main class is not specified

Reason: You chose to build an executable, but did not specify the main class.

Resolution: If you indeed want to build an executable, return to the Classes page and specify the main class as described in Specifying the main class. Otherwise, select shared library from the Application menu.

No classes in the project

Reason: The classpath is not empty but there are no classes in the compilation set.

Resolution: Go to the Classes page and force one or more classes into the compilation set as described in Working with classes and packages.

Unused classes detected

Reason: Not all class files located in the classpath are included in the compilation set. The class files that are not included may be implicitly used by the application through dynamic loading.

Resolution: If you are sure that the current compilation set is complete, click Yes. Otherwise click No, return to the Classes page, and review the compilation set, possibly adding classes to it as described in Working with classes and packages.

Absent classes detected

Reason: Classes with unresolved import dependencies detected. referencing

Resolution: If your application uses an inconsistent third-party library, click on Ignore to enable ignoring class absence. Note that any attempt to use an absent class in the compiled code shall throw an exception. Otherwise, click on Cancel, return to the Classes page, and add the entries containing absent classes to the classpath as described in Working with classpath entries and Project inconsistencies.

If an imported class is not present at compile time but becomes available at run time, click on Handle to enable the reflective shield facility.

Java 2 API classes detected

Reason: Classes coinciding with Java 2 API classes detected.

Resolution: If your application uses an inconsistent third-party library, click on Ok to enable ignoring class conflicts. The Java 2 platform classes precompiled during JET installation shall be used by your application. Otherwise, click on Cancel, return to the Classes page, and remove conflicting classes from the compilation set as described in Working with classpath entries and Working with classes and packages.


Super Prev Next

Correcting build errors

Errors detected during build, if any, are displayed in the Filtered Log area in red color. JET may assist you in fixing some typical errors caused by misconfiguration or bytecode inconsistencies.

To automatically fix such an error, highlight it in the Filtered Log area, and click the Fix it! button. If the Fix it! button does not appear when you highlight an error, that mean that JET is not able to fix it. If this is the case, the error message shall contain some tips on finding out what caused the error and how to fix it.


Super Prev Next

Packaging your application

This is actually the final step, on which you package your compiled application, along with any files it may need for proper execution, into a self-installing archive, to be used for distribution to other systems.

This functionality is not integrated into the Control Panel. When you click on Package, the Control Panel closes and invokes JetPackII deployment automation tool, automatically adding the compiled executable to the list of package files.