Geertjan's Blog

  • September 27, 2013

bck2brwsr at JavaOne 2013

Geertjan Wielenga
Product Manager

One project that raised quite some eyebrows at JavaOne 2013 was bck2brwsr, by Jaroslav Tulach and Toni Epple. In the words of Cay Horstmann in "JavaOne for the Impatient":

Jaroslav wrote a Java virtual machine in JavaScript. You write your code in (a rather stringent subset of) Java and compile it to a JAR. His JavaScript code unpacks and executes it. Today, you can access the DOM and write games with Canvas. Tomorrow, perhaps the sky will be the limit.

Getting started with it is quite easy in NetBeans IDE 7.4 RC 1 because Jaroslav Tulach knows that any technology, in order to succeed, needs a tooling strategy. Here is Jaroslav right before his session started, loudly urging (under the watchful eye of some clearly concerned security guards just outside the frame of the pic below) passersby to attend his bck2brwsr session:

So, to get started, go to Tools | Plugins and search for bck2brwsr, which will lead you to the "HTML/Java Project Support" plugin:

Then you'll find a new project type in the HTML5 category in the New Project wizard, named "HTML5 with Java Application Logic":

Next, take a look at the project structure and code:

Read this for details on the structure and code: http://wiki.apidesign.org/wiki/Bck2Brwsr

And when you deploy the application, you have a JavaFX application:

Finally, if you change the Maven profile, the application can be deployed to the browser:

There will be more in this blog in the coming weeks about bck2brwsr. In this particular entry, you've been shown how easy it is to get started with this project.

Join the discussion

Comments ( 1 )
  • Daniel Monday, October 21, 2013


    You said:

    "Finally, if you change the Maven profile, the application can be deployed to the browser:"

    I'm not fluent in Maven, how is this magic done, so that I can see this example running in the browser ?

    Thanks !!


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.