Reputation: 2638
The JVM is broadly used: Scala, Groovy, Jython, etc. I've heard it described as 'remarkable', 'brilliant', and 'massively under-appreciated'. Why?
More specifically, what makes the JVM unique? With all the money poured into .NET, or the length of time C has been around, or all the modern programming languages and VMs recently created, why/does the JVM stand alone?
Upvotes: 4
Views: 387
Reputation: 4223
With all the money poured into .NET
.NET is not open sourced, bound to Microsoft and Windows. While OpenJDk is open and available on all platforms.
the length of time C has been around
C/C++ is much more complicated to work with then java. While the result is about the same. Easier to develop equals to less money spent. That's why java is a business choice.
why/does the JVM stand alone
Java receives a great support from Oracle(SUN before) and community. It managed to collect a great audience.
Upvotes: 0
Reputation: 14520
imho, there is nothing brilliant in the fact that you can run other languages on the jvm. you can run many different languages on your OS as well. but i think that using simple bytecode as a native language of the jvm has helped a lot. it's easier to translate/compile languages to simple bytecode rather than to other high-level language. very recently the jvm specification noticed the existence of other languages and added invoke-dynamic which is currently accessible only from the bytecode (no java construct for that). but the jvm also enforces a lot of limits. for example you can't benefit from tail call optimization; startup time is a disaster so you need cheats (always running daemon) to use it efficiently for a scripting language; debugging stacktraces of non-java languages is a nightmare; haskell is still not ported to jvm because of technical difficulties and completely different evaluation models
i think the jvm is brilliant because (after a years) it's really fast (GC, JIT) stable, portable, with huge market penetration and zillions of libraries. so you write once and later run on your pc, server, phone, tv and washing machine.
why not .NET nor C? i guess: portability, price, luck. most servers are non-windows. it's cheaper to start with java than .NET. C is not portable, doesn't have GC
Upvotes: 0
Reputation: 5286
IMHO it's simply been around for a while and had the time to be shaken out. (I'm comparing the stability of the JVM today vs. 15 years ago). In particular the JIT/hotspot implementation, garbage collector, thread handling are well done. I don't think the jvm was intended to be a multi-language platform but it's proven to work well with non-java languages.
Upvotes: 1