JET : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

JET splash screen  JET

JET (Just Enough Time) static AOT (Ahead Of Time) compiler.

What Is JET?

JET is Excelsior’s Java optimiser and native code generator, created in Novosibirsk Russia. There are currently versions for Windows and Linux in English. Excelsior is not responsible for the accuracy of anything said on this page. It is based on my personal experience with JET over a number of years.

JET Version jet12.0-pro-x86 supports up to Java 1.8.0_131 (The most recent Oracle release is 1.8.0_131 ). Last revised/verified: 2017-03-08. JET supports Vista, W2008, W7-32, W7-64, W8-32, W2012, W10-32, W10-64, Linux, LinuxX86, LinuxX64 and Ubuntu. Mac OSX is coming soon. JET comes with a precompiled JRE, so you don’t actually need to install a Oracle JDK (Java Development Kit) 1.8.0_131 though obviously you will need some JDK for development, usually JDK 1.8.0_131. JET jet12.0-pro-x86 now lets you natively compile Tomcat and Tomcat applications. There are currently no MPs (Modifier Packs) to download and install for Jet jet12.0-pro-x86.
Why Use JET? Components JET 6.0 Improvements
Downside of JET Maintenance Packs{JETPack Installer JET 5.0 Improvements
When Not To Use JET JETPerfect Tips
Example of Command Line JET Use Auxiliary Files JET Glossary
Example of ANT JET Use JET 11.0 Improvements Purchasing JET
Detecting JET JET 10.5 Improvements Deciding Which Version You Need
Kudos JET 10.0 Improvements Prices & Ordering
How Does JET Work? JET 9.0 Improvements Excelsior JET website
Preparing An Application for Distribution JET 7.0 Improvements Links
Viewing Generated Assembler JET 6.5 Improvements
64-bit JET 6.4 Improvements

Why Use JET?

Downside of JET

When Not To Use JET

Example of Command Line JET Use

You can define a JET project and compile it, complete with installer using a GUI. It is a multi-step process, but not complicated. You can also compile in various ways from the command line or *.bat scripts.

Example of ANT JET Use

My projects are typically quite simple and I compile them with ANT scripts simply by handing a jar to the JET compiler.

Detecting JET

Your program can detect that is in running under JET by looking at the system properties such as:
java.vendor=Excelsior, LLC
java.vm.name=Excelsior JET
java.vm.vendor=Excelsior, LLC
java.vm.version=1.6.0_31
e.g. This may be important since JET does not support Throwable. getStackTrace() by default. You must request stack trace support, which slows the programs down.

Kudos

I have been very impressed with the JET people. Even without an official support contract, the JET people have responded quickly and thoroughly to my bug reports and suggestions for improvements. They have provided better service free than most companies provide for hefty fees. I wonder what they do for an encore when you do sign up for support! Optimising compilers are notoriously buggy, yet JET seems to generate flawless code time after time. I have never encountered any wrong code generated. The only serious problem I have is Jet does not have as many built-in root SSL certificates as Oracle Java 7. This means my apps when running under Jet have trouble screen scraping some https: websites. You can, of course, copy Oracle’s cacerts file on top of Jet’s for your own personal use in testing and debugging, but you cannot legally do that for programs you distribute.

Purchasing JET

How Does It Work

See Excelsior’s simplified overview of how JET works.

How does JET work? It needs somebody else’s compiler such as Oracle’s to produce the byte codes, then it converts class files to a native Windows EXE file. Why is it so fast? It is able to determine if methods overriding a particular non-final method are never actually called in a particular application and therefore inline the method or generate direct calls of it. JET will allocate some local objects on the stack. It can eliminate a remarkable amount of code that is not necessary, e.g. redundant checks for null by both caller and callee. JET does loop versioning, i.e. it creates a special safe version of loop code used when it knows that various exceptions can’t possibly happen, e.g. subscripts out of range. This way it can avoid much of the overhead of the Java safety net.

There are now three versions (four if you count the Embedded edition) described in their FAQ. It supports all of Java including class.forName dynamic class loading.

Preparing An Application for Distribution

Here is an overview of the process of preparing Jet-compiled application for distribution. I am describing the process for Windows, but it is similar for Linux. Let us assume your application is called Rabbit and will eventually run on the client machine as rabbit.exe.

  1. Write and debug your Rabbit.java java source code in an IDE such an IntelliJ Idea.
  2. Compile your Rabbit.java source with javac.exe, probably using Ant or Maven.
  3. Bundle your Rabbit.class files into rabbit.jar with jar.exe or genjar.jar.
  4. Compile (i.e. convert class files in the jar into native machine code) your rabbit.jar from the command line with jc.exe or for finer control use the Jet Control Panel GUI to produce a rabbit.exe file. The compilation tweaking hints are stored in the human-readable rabbit.prj file. The rabbit.exe file will run locally. It is quite small since it uses the pre-installed Jet Run time and library of precompiled JDKs. It leaves behind intermediate files in jetpdb to speed up future compiles. rabbit.xbind.script contains a list of DLLs (Dynamic Link Libraries) that rabbit needs to run. With the Jet Control Panel you can implement a splash screen that comes up immediately without having to write any code.
  5. Use the JetPack GUI to bundle up your executable, jet compiled parts of the JDK that it uses and library code into one big setup-rabbit.exe self installing exe bundle. That is what you distribute. JetPack stores its tweaking hints in the rabbit.jpn file.
  6. You then post the fat setup-rabbit.exe on a website or burn it on a CD and distribute it to your client.
  7. When the user runs setup-rabbit.exe it unpacks itself and places its various pieces, including rabbit.exe and runtime on the hard disk, then sets up desktop icons and menus.

64-Bit

JET is 32-bit with 64-bit planned for 2009. When the JET-compiled 32-bit executables run on 64-bit windows you have a 3 GB address space. Oracle HotSpot requires a contiguous address space for the heap, whereas Excelsior JET (and, for that matter, JRockit) does not. So if you have lots of RAM, but the virtual address space is fragmented due to DLLs already loaded, Excelsior JET may be able to allocate more objects on the heap than HotSpot. Further, with JET you don’t have to specify the heap size. You can have it automatically adjust as it runs taking more or less memory depending on how much is available in the system. This lets you automatically exploit the whole machine when there are no other jobs running.

Have a look at the Which utility for code to recognise JET executables and whether they are up-to-date, compiled for the latest runtime.

Components

JET Components
File Purpose
*.prj Human-readable project file.
jc.exe Compiler. Converts *.jar to *.exe or *.class to *.exe.
JETPackII.exe prepares self-installing apps.
JETSetup.exe Adds support for yet another JVM (Java Virtual Machine).
LaunchPad.exe Project control, GUI control of the compiler.

Viewing Generated Assembler

JET versions prior to 5.0 allow you to view the assembler generated by using the -genasm+ key (aka compiler option switch) in the project file to generate assembler instead of object files. This was an undocumented feature. For JET 5.0+, you will need to use a conventional disassembler to view the generated code. JET -generated code is unusually difficult to reverse engineer since the compiler does loop versioning and hiking and is so creative at devising code that does the same thing as the original but in a quite different way.

Maintenance Packs

From time to time, Excelsior issues MP (Maintenance Pack) s to upgrade the Jet compiler, runtime and highest level of the Oracle Java runtime supported. When you install these, for all practical purposes all your Jet application exes will stop working until you rebuild them. It is possible to ask Jet to retain obsolete runtimes or to regenerate them. However, I have never been able to get old apps to work without rebuilding them. I have problems with incompatibility between versions of Java, versions of Jet and something called binary compatibility level which might be sort of build number. If I fully understood how this worked under the hood, presumably, I could manage a corral of both obsolete and up-to-date Jet software and my Jet-compiled applications of various vintages.

I impatiently cut the Gordian knot. I just delete all my old exes and rebuild everything. The catch is my build process uses custom Jet-compiled applications. I can’t rebuild because all my tools stop working. I kludge my way through this chicken-egg problem mainly by reverting to executing the original jars instead of the Jet-prepared exes. I can ease the pain of the transition by first temporarily rebuilding my exes without first rebuilding my Java source or jars, then rebuild the java and Jars (using recently-rebuilt Jet-complied build tools) and then rebuild all the Jet exes a second time.

If the setup utility stops working after installing a maintenance pack, just reboot. It might be a good idea to reboot after the install on general principles.

I wrote a free utility called Which to, among other things, help you find obsolete Jet-compiled application exes.

JETPack Installer

JETPack bundles up self-installing applications. It is much like an InstallAnywhere for Java/ JET. It allows: JETPack is very easy to use. Just fill in the blanks.

JETPerfect

JETPerfect was the global optimiser that came with the Professional Edition. It is no longer supported. It did a very time consuming and labour-intensive form of global optimisation creating a stand-alone executable.

Auxiliary Files

When you first install JET for development, if you don’t accept the default JVM, it has to compile the entire JVM set of class files. This takes about an hour on modern machines or over twelve hours on clunkers with less than 512 MB of RAM. People who just want to run JET-compiled apps don’t have to do this.

Obviously, to use JET, you need the JDK installed on each developer machine. To run the programs you need the JET DLL runtime and the application. The DLL contains a compiled version of the JRE. Even though Oracle’s license prohibits partial JRE redistribution, Excelsior has come up with a solution that enables you to omit the unused Java SE APIs without breaking the Oracle license. In a general case however, the entire Java SE API has to be bundled with your JET application to deploy it on a customer machine.

JET 11 Improvements

JET 10.5 Improvements

JET 10.0 Improvements

JET 9.0 Improvements

JET 7.0 Improvements

JET 6.5 Improvements

JET 6.4 Improvements

JET 6.0 Improvements

JET 5.0 Improvements

Tips

JET Glossary

Adaptive Heap Size
distributable
A program bundle distributed to customers. When it runs, it installs the program on the clien’ts disk. It contains the program, auxiliary DLLs, data files, icons etc.
Excelsior
The company headquartered in Novosibirsk Russia that makes JET.
executable
program containing machine language code that can run on Windows or Linux. The JET native compiler produces executables. You can run these directly on the machine used to compile them. You must bundle them first into distributables if you want to run them on other machines.
jc.exe
JET native compiler than converts class files produced by javac.exe to Windows or Linux native executables (*.exe files). You control whether to use production or beta jc.exe by putting the corresponding directory on the path.
JET
A native Java compiler for Windows and Linux from Excelsior than includes an installer. It comes is three versions, standard, professional and enterprise.
JET Enterprise
the high end version of the JET Java native compiler. The main advantage over the professional version is the optimised server runtime for extra speed.
JET Standard
the entry level version of the JET Java native compiler.
JET Professional
the intermediate level version of the JET Java native compiler. The main advantage over the standard version is slimmer distributables. This is what I use.
JETPackII
The GUI used to bundle a JET application up for distribution.
JRE
JRE. Oracle’s Java run time. It is not required on either the development or client machine to run JET-compiled applications. A JET -compiled version of it is automatically bundled with distributed application along with Excelsior-written native classes and DLLs.
JET launchpad
the GUI used to set up JET projects to control how they are compiled.
JDK
JDK. Oracle’s Java development tool. It is not required on either client machine to run JET-compiled applications, though you would normally have a copy of the JDK on the development machine.
versioning
a powerful optimisation technique JET uses to create several specialised versions of a loop body so that it does not have to check conditions in the middle of the loop body. It selects the loop body version at the top of the loop. This removes time-consuming loop body jumps and improves code locality and avoids instruction pre-fetch cache flushing. The technique is almost impossible to do by hand in assembler. This is one of the many reasons JET can often out-perform the best assembler hand coding.

This page is posted
on the web at:

http://mindprod.com/jgloss/jet.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\jet.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[18.97.14.89]
You are visitor number