Friday Sep 27, 2013

bck2brwsr at JavaOne 2013

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.

About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« September 2013 »
SunMonTueWedThuFriSat
2
3
4
5
8
14
15
     
       
Today