Using Excelsior JET in a Multifunction Grow Room Controller
Excelsior JET case study
Our goals when utilizing Excelsior JET were to decrease the download size of our
application, increase the performance of the application, improve the installation
experience, and to increase the level of IP (intellectual property) protection.
The first release of our software was released in the form of JARs,
at that time the Sun JRE 1.4 was required for the software to run properly. Quickly it was realized that this approach had many downfalls. First the users were accustomed to conventional executable files along with installers. The concepts of executable JARs and Java itself were (and still are) not clear to many of our users. Many people didn't have a JRE installed at all, others had older and incompatible versions. Further, while the class files were obfuscated it was obvious that it was a weak solution to protecting our IP.
The Growtronix System is an all-in-one Grow Room Controller,
capable of simultaneously acting as Temperature Controller, Humidity Controller,
Co2 Controller, pH and EC/TDS controller, Reservoir Temperature Controller, etc.
The second release employed a hefty investment for us at the time into
a Virtualization suite then known as Thinstall (now known as VMware).
Thinstall allowed us to package the JRE along with the application JARs and
other resources into a single executable. It didn't matter what JRE was installed on
the target system and further included an installer. This worked out well for us.
However one of the downfalls was that the entire JRE was included in
the single executable. At that time it was about 40-50 MB in size.
When we upgraded to Java 6 that executable jumped up to about 80 MB.
To top it off, because of the way Thinstall compresses the files the startup time
was horrendous: a long 20+ seconds. Because Thinstall is Windows OS specific
the Linux version of our software was abandoned. Thinstall worked out well
until Vista came out and our version of Thinstall didn't support it.
Meanwhile, VMware had changed it business model and started charging a fee per
distributed copy on top of a hefty upgrade fee. This model simply wouldn't work for us
or our users and so Thinstall needed to be abandoned.
I went to the Internet searching for options and found Excelsior JET but not before
wasting a lot of time on another option. I first found another native Java compiler
called JNC (Java Native Compiler) built on top of GCJ (GNU Compiler for Java).
I set off to utilize the compiler and ran into a plethora of problems.
JNC only (partially) supports Java 1.5, I had to recompile to be compatible with
1.5 and this required changes to the source code.
The state of JNC's Swing and AWT is stated at 1.4 and is said to be experimental.
Many changes needed to be made to the source code to make things work as expected.
While I think JNC is a great tool, I was compelled to give Excelsior JET a try
when I read about the various advantages over JNC.
With Excelsior JET being 1.6 compliant and having full AWT and Swing support
compiling the 1.6 version was trivial at best. To put it simply it just worked
and worked well. I did not have one issue. No source code changes, no errors,
no problems, no hassles. Less then 2 hours were required to have a fully setup
installation of our application which happily runs on Vista.
In the end Excelsior JET solved every one of our problems. The application now
runs on Vista and as a bonus we will soon be offering a Linux version once again.
The JRE need not be installed on the target system, the download size is down from
~90 MB to ~40 MB, the application is easily installed and ran in a way every Windows
user is familiar with, and the startup time is MUCH faster coming in around
2-3 seconds down from 20+ seconds. Excelsior JET is the Ferrari of Java Compilers
and I would highly recommend it to anyone serious about deploying Java applications
in a secure and professional manner.