A key engineer on Sun's next-generation JRE project, Ethan Nicholas initiated many of the changes that led to a slimmer and more user-friendly JRE in Java Update 10. In a Sun Developer Network article, Nicholas shares more details of what's new in the latest JRE version.
Java 6u10 is the biggest update release ... of Java we have ever shipped, and the fact that there are no public API changes doesn't mean that you won't see anything to be excited about....
Ethan Nicholas, a key engineer behind many of the new features in Sun's next-generation JRE, shares more details of Java 6 Update 10 in Introducing Java 6 update 10.
While Java updates don't introduce new APIs, nor changes to existing APIs, Nicholas notes that:
Java 6 update 10 is a very different animal than the updates that preceded it. Java 6u10 pushes the envelope by adding more new features and functionality than in any previous Java programming language update release, including many that have been a long time coming...
The most immediately beneficial new feature, especially to developers and Java end-users, is a slimmer JRE download. Using a distribution mechanism that allows for the incremental download of the entire JRE, the initial download size for a typical Swing application ranges between 4-5 MB:
In the current build, the typical download size for Swing programs and Java applets is on the order of 4-5MB, compared to 14.4MB for the full JRE.
Applets also received a major architectural boost by running them outside the browser's process:
The next-generation plug-in runs applets outside of the browser in one or more separate processes. Applets still appear inside of the web browser window as they always have, but this means that it is now possible to use different JRE versions, command-line arguments, and configurations to run different applets...
The isolation provided by running the web browser and the JRE -- two very large, very complex pieces of software -- in separate process spaces improves the reliability of both, and gives applets the same flexibility and control over JRE configurations that other Java software has always enjoyed.
The way Update 10 achieves this is by allowing applets to take advantage of the same JRE hooks desktop JNLP applications have. As a side-benefit, applets can easily be turned into desktop applications, and vice versa, a desktop application can be deployed inside the browser:
With very little additional work, you can now deploy the same program as both an applet and a Web Start program, and still take advantage of JNLP services such as PersistanceService and FileSaveService.
The following HTML code is all it takes to ensure that Java 1.6 is installed and then a Java applet is launched:
Nicholas also discusses Nimbus, the new Swing look and feel:
A brand new, modern look and feel based on Synth, Nimbus provides a polished look to applications which choose to use it. And because Nimbus is drawn entirely using Java 2D vector graphics, rather than static bitmaps, it's tiny (only 56KB!) and can be rendered at arbitrary resolutions.
In the article, Nicholas also talks about the default settings for the Pack200 compression, as well as a streamlined JRE updater.
Do you think these new features are sufficient to cause a desktop Java comeback?
I think it's misplaced to talk about a comeback; rather, we should look at what you can do with applets, what people have done with them so far, what sort of applications this enables, etc.
Personally, I don't care if Java is competitive in making "compelling" websites or advertising banners and boxes. That would be one use of the technology, but apart from the difficulty in competing with the established technology (which appears to be Flash and related), I just don't find it a very interesting thing to do with the JVM on the client side.
But there are a whole slew of uses which this could open up. I think in many cases Java already has some foothold in these areas, but we might see a resurgence of interest. For example: - My bank or other financials institution can offer high-security login, data retrieval, operations using a variety of crypto protocols written in Java. With the ability to download code at runtime, one could also choose--or the bank could enforce--a new protocol or implementation. A new plugin could make this a no-brainer for people who want a secure end-to-end connection. - Remote terminal/console access from the browser. Secured admin access/control of remote processes. You should be able to write a much better interface (even application-plugin-based) for this than what you can do with AJAX. - Educational materials, tools, guides, samples, etc. - Research prototype software - Cool experiments being done on top of the Java graphics APIs - Language tools--in-browser consoles and small editors for languages that run in the JVM - Better in-browser editors for blogs and online documents
These are things that interest me, but I'm not thinking like a consumer. I did spend a couple of hours today looking for applet implementations of the Game of Life--found quite a few, and with the new plugin (tested from Ubuntu running Firefox 3b5) it was a pretty pleasant experience to try these out. Many that I found are, unfortunately, written using AWT, but even that runs well. Actually, the level of experimentation going on in that one field (cellular automata) and shared with other people using applets made me think again that the task for Sun is to improve the browser support for Java as a platform, a target for interesting applications. Let the developers (of all sorts) decide what they'll do with it. I think we'll be surprised.
This is great news. I think the Java platform is going to continue going strong due to its open source nature, first class multiplatform availability, and a continued stream of improvements such as this one.
This still leaves a good niche for Java applets where you need something non-trivial done on the user's machine or where the existing browser APIs fail, for example if you want a nice multi-file upload widget on your site.