JAX Finance roundup: “Good coders have to be lazy.”

Do We Need a JVM Based Web Browser?


‘Is It Time For a JVM Based Web Browser?’ according to Axel Rauschmayer, the answer is a resounding yes. Rauschmayer sees the world of the app developer as being split into two potential platforms: The Java Virtual Machine (JVM) and the web browser.

Both excel in different areas. The JVM supports many languages, there is a rich ecosystem of JVM-compliant tools, and it supports the OSGi framework and other module systems. Meanwhile, apps developed for the browser can be tested without the user having to download anything – which has a definite appeal for the user. Application states can also be easily cloned using tabs, and different data streams can be integrated.

Both have different strengths and weaknesses, but Rauschmayer proposes that these needn’t be the case: what about building a browser on the JVM? “It seems like a missed opportunity for the JVM that all major browsers now have JITs for JavaScript, but none of them uses the JVM.” He envisions this browser as being modular and extensible; what he calls “a new kind of web/desktop application hybrid.”

He proposes combining the JVM/browser hybrid with the JWebPane component, which provides basic web page browsing functionality, renders web pages and provides basic user interaction. He suggests using the JWebPane component to port Webkit to the Java2D API, which would bring advanced 2D graphics and imaging to the JVM/browser experience.

He acknowledges there are applets that can integrate the JVM and the browser, but this integration isn’t yet tight enough for Rauschmayer’s liking: “one still feels the barrier between Java and the browser.”

But are we closer to a Java web browser than we think? According to Dominique De Vito, Google Web Toolkit (GWT) provides a programming model for the Java browser proposed by Rauschmayer. Vito sees the GWT Java to JavaScript compiler as allowing “more and more pieces of a browser edition of Java (to) run on top of JS engines, inside browsers.” However, Rauschmayer disagrees that GWT will ever be able to translate all of the JVM platform to a browser. To him, GWT is missing one crucial function, the ability to install the server functionality locally.

A modular, extensible web browser implemented in Java has been attempted before, in the form of Sun’s HotJava Browser. HotJava was actually the first browser to support Java applets, however it was held back by the performance limitations of Java virtual machine implementations at the time, and was discontinued. It is now no longer supported. The last release was HotJava 3.0 in 2007.

Another potential player in the JVM/browser debate, is Project Lobo. Lobo is an open source web browser that is written completely in Java. It also supports JavaFX rendering, although it is still at the experimental stage. The Lobo team make a compelling argument for the web browser written in Java as oppose to a language compiled into native code. They propose several advantages, one of which is security. The Lobo team claim that “in principle, a Java program is less susceptible to certain types of vulnerabilities such as a buffer overflow attack.” As a Java program, Lobo has access to both a rich portfolio of cross-platform plugins and cross-platform mechanisms to represent web content. However, things seem rather quiet on planet Lobo at the moment – the last release was over a year ago.

In theory, a Java-based web browser offers many advantages, but the fact remains that if there isn’t a widely-adopted, JVM/browser currently under active development, then is there really much need for such a browser?

comments powered by Disqus