Excelsior JET Technical FAQ List
This page contains answers to the most frequently asked technical questions about the Excelsior JET product and its usage. If your question is not answered here, please submit it to Excelsior Technical Support. or directly to the JET team.
Note: We are currently migrating this list to the Knowledge Base. Please do not bookmark this page as it will eventually become a list of pointers to KB articles.
Installation Problems
Compilation Problems
- During compilation of my project, JC issues an "out of memory" message and then terminates
- During compilation of my project, intensive memory paging occurs
- Class, method, or field not found when compiling a third-party JAR or ZIP
Run-Time Problems
- How do I suppress the console window in my AWT/Swing application?
- How do I set Java properties at the very startup of my application?
- How do I control my application's memory consumption?
- The compiled application cannot find resources (images, etc.)
- Stack overflow occurs during execution
- Stack backtrace does not work
Application Performance
- Which objects are allocated on the stack when I enable the option GENSTACKALLOC?
- My application takes much more RAM if I split it into DLLs than when it was a single EXE
Interoperability
- How do I use a JET-compiled DLL from my C/C++/Delphi/VB6/VBA program?
- How do I call a function that resides in a C DLL from my JET-compiled Java program?
Deployment
- The EXE created by JET does not work on other computers due to missing DLLs.
- How do I attach an icon to my JET-compiled executable?
New profile creation takes a lot of time due to slow compilation
Possible Cause: Your system does not meet the minimum requirements. It should have at least 1.5GBMB of physical RAM to avoid extensive paging during profile creation.
Resolution: Add more RAM to your system.
Possible Cause: Processes running in the background occupy too much memory.
Resolution: Add more RAM to your system or stop the processes you do not absolutely need running during JET installation.
Possible Cause: There is an antivirus monitor running, which checks JRE jar files for viruses each time they are accessed by JET.
Resolution: Disable the antivirus monitor before installing JET and re-enable it after the installation ends.
During compilation of my project, JC issues an "out of memory" message and then terminates
Reason: The current setting of memory usage limit is too small for compilation of your program.
Resolution: Increase the value of COMPILERHEAP in your project file or on the command line, for instance:
During compilation of my project, a lot of memory paging occurs
Reason: The current setting of memory usage limit is too large for your system.
Resolution: Close all applications that you do not need at the moment. If it does not help, reduce the value of COMPILERHEAP specified in your project file or on the command line, for instance:
Class, method, or field not found when compiling a third-party JAR or ZIP
See Knowledge Base article 000011.
How do I suppress the console window in my AWT/Swing application?
See Knowledge Base article 000013.
How do I set Java properties at the very startup of my application?
Properties may be set in a batch file using the JETVMPROP environment variable:
How do I control my application's memory consumption?
See Knowledge Base article 000002.
The compiled application cannot find resources (images, etc.)
See Knowledge Base article 000014.
Stack overflow occurs during execution
The default size of a thread's stack is 900,000 bytes, which is sufficient for most applications. However, a recursive algorithm may require a larger stack. If your application crashes on a stack overflow, use the STACKLIMIT equation in your project file or on the commmand line to adjust the size of threads' stacks:
See Knowledge Base article 000015.
Which objects are allocated on the stack when I enable the option GENSTACKALLOC?
According to the Java standard, all objects are allocated on the heap. However, a particular object that is never assigned to a static field or a field of a heap object may be safely allocated on the stack. Typically, these are temporary objects local to a particular method. Stack allocation works much faster and also reduces GC impact on performance.
For a detailed description of this optimization, refer to the respective research paper.
My application takes much more RAM if I split it into DLLs than when it was a single EXE
Reason: By default, a DLL is mapped onto the same base address as EXEs (0x400000). The operating system resolves this conflict by relocating each DLL to another base address during load. For relocation, the entire code and data segments of the DLL are loaded into memory. Without relocation, code and data are loaded on demand in 4KB pages.
Resolution: For each DLL (and, optionally, EXE) that constitute your application, specify a different image base address in its project file, so that their binary images do not overlap in the address space:
-imagebase=0x400000
% In DLL.PRJ:
-imagebase=0x500000
How do I use a JET-compiled DLL from my C/C++/Delphi/VB6/VBA program?
In C, C++, and Delphi, use the standard Invocation API. See sample programs in the SAMPLES\Invocation subdirectory of your JET installation.
In VB6/VBA, interfacing to Java is only possible via COM. Excelsior JET 3.0 and above comes with COM-based sample programs in both VB6 and VBA. Note that there is a flaw in versions prior to 3.0 that makes those samples work incorrectly.
How do I call a function that resides in a C DLL from my JET-compiled Java program?
JET fully supports Java Native Interface (JNI), which is the only standard way to call a native code function from Java. However, direct usage of JNI is very inconvenient and error prone. JNI proxy APIs such as JNA (Java Native Access), or our own xFunction enanle calling native code functions from Java without using JNI and C programming at all.
The resulting EXE does not work on other computers due to missing DLLs
See Knowledge Base article 000012 and this item from the main JET FAQ.
How do I attach an icon to my JET-compiled executable?
See Article 000003 in the Knowledge Base.
