To my mind, the idea of porting is that you face a choice: you can recreate the JVM functionality in your own runtime, or you can port to the JVM. Porting to the JVM is certainly non-trivial, but you then get thousands of man-years of work in return. It's certainly worth doing a project to see whether the porting effort pays off; especially if this done concurrently with working on the language's 'native' runtime.
As long as you aren't native, that is.
Although that's unrelated to the discussion at large.
Is there a C programmer on the planet that does production builds with a non-optimizing compiler? How is your comparison even remotely relevant to the GP?
The advantage of going the native route is that it gives you improved observability and post-mortem. The JVM is a VM (Java's) inside a VM (the OS's), and that additional layer doesn't come for free.
Some of those are actually LLVM frontends.
As for the type of hypervisors you're referring to, those things are effectively half-baked operating systems. That's why something like KVM is better -- you're not pretending to be a non-OS while slowly reinventing a wheel that the *nixes have and always will do better.
I think we're beginning to wander massively afield though! :)
My usual response regarding the merit of the JVM is this: there is a reason there's jvm on the server, desktop, on your phone, on the rovers on mars and god knows on how many mission critical systems.
And no it isn't because of great marketing, which is another common and lame response from JVM detractors.
The JVM is an impressive engineering effort and the eco-system spawned by it is currently unrivaled.
With the new trend of porting other languages (ruby,python,js..etc) to it, the I see the JVM as the middleware over which most future software would be built.
There's a node-ffi package, although it has some overhead from the call itself.
This would allow you to use NodeJS but still leverage the existing Java libraries, not requiring you to rewrite them.
Interop with the things that already exist in the Java ecosystem.
> I had this idea before that porting things like Ruby or Rails to the JVM was meant to offer ruby the advantages of having a java core (better threading, garbage collection, faster).
To the extent that those were effects of porting Ruby to the JVM they were mostly secondary, Java interop was the key feature (Rails, BTW, wasn't ported to the JVM, it just runs anywhere you have a functional Ruby implementation -- heck, before Ruby had executable specs, the test for a functional implementation was pretty much "does it run Rails".)
This makes a lot of sense.
Also, if you work at a Java shop having stuff run on the JVM affords a way to sneak in new tech. :)
[1] http://torquebox.org/ [2] https://github.com/jruby/jruby/wiki/Servers [3] http://www.restlessprogrammer.com/2013/02/multi-threading-in...
What is the source for that?
e: Thank you guys for the answers, definitely makes a lot more sense now.