Java and JavaScript Get Closer?

Oracle To Run Java Inside JavaScript Environment?

Jessica Thornsby

Oracle VP Adam Bien talks about Oracle’s ‘plan’ to run “Java inside a JavaScript environment.”

Founder of Snowtide Informatics Chas Emerick, has blogged about a recent statement from Vice President of Java Development at Oracle, Adam Messinger, in which he appears to state that Oracle plan to run “Java inside a Javascript environment.” He claims this is something Oracle feel they need to achieve in order to extend Java’s availability onto devices such as the iPad, or desktops where users choose not to use applets. “We want a solution that works there,” he said.

Chas Emerick theorises that Oracle could be developing a method for using JavaScript as a compilation target. “It’s anyone’s guess whether this is Oracle’s stab at something akin to GWT,” says Emerick. Previously, an implementation of the JVM in JavaScript has been attempted in project ‘Orto.’ This project allowed users to take a Java app, compile it, and run it through Orto. Orto then produced the JavaScript and embedded it in a web page. The demo offered by the project was a simple Tetris game:

And here’s the generated source code:

"java/lang/Thread 1316742099":function(){var orto333=orto245[0];
var orto336=orto350(orto333);
return ;
case 117:orto246[orto247-2]={high:(~orto246[orto247-2].high)
case "CHECKBOX":orto171=orto188["orto/ui/CheckBox"];
case "IMAGE":orto171=orto188["orto/ui/ImageButton"];
case "RADIO":orto171=orto188["orto/ui/RadioButton"];
comments powered by Disqus