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);
if(orto336.orto340!=orto310){orto223("java/lang/IllegalThreadStateException",null);
return ;
}
case 117:orto246[orto247-2]={high:(~orto246[orto247-2].high)
  &0xffffffff,low:(~orto246[orto247-2].low+1)&0xffffffff};
if(orto246[orto247-2].low==0){orto246[orto247-2].high++;
orto246[orto247-2].high&=0xffffffff;
orto246[orto247-2].low=0;
}break;
case "CHECKBOX":orto171=orto188["orto/ui/CheckBox"];
break;
case "IMAGE":orto171=orto188["orto/ui/ImageButton"];
break;
case "RADIO":orto171=orto188["orto/ui/RadioButton"];
break;
Author
Comments
comments powered by Disqus