Live data from Hacker News

Java Virtual Machine in pure Node.js

github.com

21–30 of 143 posts

Re: Java Virtual Machine in pure Node.js

#23
post #12

18ms for calculating Fibonacci numbers from 1 to 10. This is definitily bringing JAVA back to the good old days of enterprise execution speeds. :-) Really cool proof of concept! I would really enjoy seeing more projects like this!

> JAVA

Why did you spell it in all-caps here?

Re: Java Virtual Machine in pure Node.js

#29
post #8
post #4

Just a toy implementation[1], if someone is wondering. [1]The basic .class file attribute parsers are located in libs/classfile, while a simple bytecode interpreter can be found in jvm.js. It doesn't load a real runtime library (classpath, apache harmony,openjdk,etc...) but it partially implements a few java.* classes in pure javascript under libs/java.

What version of java does it handle? Does it support java.lang.*? What other standard libraries?

It's too early to talk about java versions, but i suppose he used the latest jvm specification to implement his classfile parser. Only a few methods of some classes of java.lang and java.io (screen output and some basic stuff like String methods,etc..).

Re: Java Virtual Machine in pure Node.js

#30

Now you just need to run Rhino( https://developer.mozilla.org/en/docs/Rhino ) on it and you will be totally meta.

My current research project, Doppio, can already run Rhino in the browser using JavaScript. :)

Demo: http://doppiojvm.org/

Code:https://github.com/int3/doppio

Post reply on HN