“Easy Deployment Is Finally Here” session, my notes

From the last couple of posts it seems my blog is turning into a JavaFX blog, but what I really want to do is make sure I capture some important notes from last week’s JavaOne before I forget eveything. One interesting session that surprised me was the “Easy Deployment is Finally Here” by Ethan Nicholas, I almost skipped it thinking it was going to be about some minor WebStart improvements. I’m glad I didn’t skip it, it was all about the new “Consumer JRE”.

Improved installation experience

First, the Java installer has gone through some minor yet very positive usability improvements.


Some changes to note:

  • The scary license is not shown anymore, unless the user chooses to view it.
  • “Custom setup” button has been removed, if you want to change the default installation folder, there’s a simpler “change” button right on the first screen.
  • The title bar now reads “Java Setup” instead of the full Java name with version and ugly ™ text.
  • The progress section of the installer now has a banner explaining what Java is.
  • Friendlier screen when installation is complete. It says “Thank you!” instead of “Complete”. It doesn’t use the word “wizard” (a developer’s term) and it offers the option to restart the browser automatically.

Not too exciting? Well, I’m a usability geek, so don’t be surprised :-)

Another installer improvement is “patch in place” which basically means not having dozens of Java VM versions littered all over the hard drive. What wasn’t clear to me was how to handle the situation were you do want multiple versions (maybe that’s more of a developer issue and handled via the JDK installer). The next part of the presentation concentrated on ease of use features for developers to find out what VM version is installed and to let the user update their JRE. There’s a set of new JavaScript functions that Sun is making available:

  • getJREs() Returns a list of installed JRE versions
  • versionCheck(pattern) Returns true when pattern matches an installed JRE (ex: “1.5*”, “1.6+”)
  • installLatestJRE() Installs the latest JRE using the browser or a “platform appropiate mechanism”
  • writeAppletTag(attributes, parameters) No need to manually write applet tags anymore
  • runApplet(attributes, parameters, version) Ensures appropiate JRE version is installed and then outputs applet tag
  • isWebStartInstalled() Checks if WebStart is installed
  • createWebStartLaunchButton(jnlpURL) Outputs a button that when clicked, ensures webstart is installed and launches the specified JNLP

Note that many of these calls are limited by the platform, browser and what JavaScript allows. For example, getJREs() will return the highest installed JRE and only family versions of the JRE are detected (1.5 vs 1.5.0_11). Also, in some situations clicking on a JNLP will result on an annoying “open or save” dialog (this sometimes happens to me on firefox). The solution for this problems is to install a “plugin” that will go into the registry and give more accurate results, eliminate the issue with JNLP files and provide a more seamless installation from the browser. You just use the Javascript calls and let the Javascript and/or plugin handle it, depending on the installation the user has. The following slide explains it better:


One other installation addition is the GetJava.exe program (I think it’s Windows only). You can run it to check the JRE version that is installed, and it can also be used to automatically download and install the Java VM (it has proxy settings, and the like too). This program will help people writing their own installers or doing manual installs, it also helps if you need to find out the available VMs but don’t want to write code to check the Windows registry.

Download size

As everybody knows, the JRE has been growing and growing with each subsequent release. Some say the VM is too bloated with libraries, as the following chart shows:


One interesting thing about that chart is that the JRE size in Java 5 actually went down, I think this was due to Pack200. Anyways, the gains there were quickly lost by the time Java 6 (I didn’t know Java 6 had that many additions) was released. So Ethan described a new project to released a “Kernel JRE”, which is a modular VM that will contain the minimum number of files to run something like “Hello World”. As new features are needed (ex: “java_swing”, “java_net”) modules that have the implementation for them will be downloaded on demand. This change is not for Java 7, but for the next major release of Java 6. It will be an additional download option, just like today users can download the “offline” and “online” installers for the VM. Somebody brought up a question as to what happens if somebody installs this minimal VM and they go on a trip with no online acess, well in that case they won’t be able to run applications that need additional functionality so that’s a problem. Another question was about what happens when a download fails, there will be a UI for this process and the VM will notify the user and have the option to try again or quit the program.


The slide above shows some JRE sizes based on different applications, notice that LimeWire requires a bit less than 4 megs, not bad.

Startup time

As for performance, Ethan mentioned that the biggest issue is “cold startup” times. That means, the time it takes to load the VM into memory. One option is to load the VM in RAM and launch it when necessary, just like Quicktime and other applications do today. They are not using that option as it seems like a waste of memory if you are not running any Java apps (and I agree). Instead, the plan is to use something called the “Java QuickStart Service”. It tries to keep the JRE files in the system’s disk cache, so that when the VM needs to be started it should launch very quickly. If the system is very low in memory, the QuickStart service will then disable itself.

In conclusion

That pretty much covers most of it. I’m really excited about all the improvements made in this area, and it looks like there’s a renewed effort at Sun to get this right and provide a great user experience when using Java desktop apps. The best thing about this is that we don’t have to wait for Java 7, which is really smart, we need this functionality as soon as possible. I would love to hear more details about the dates, and when we can possibly try this in some beta (if that’s going to be an option at all).

Related links

Chet Haase; Consumer JRE: Leaner, Meaner Java (this one has all the details)
Ethan Nicholas ; Announcing the Consumer JRE (again!)
Alexis Moussine-Pouchkine; Consumer JRE
Ed Burnette; Sun CTO promises Flash-like experience from JavaFX and new runtime
Elliotte Rusty Harold; JavaOne Notes

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.



Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>