Besides Java, other languages can run on the Java Virtual Machine like Scala, Kotlin, Groovy, Clojure.
The other notable mentions that come with the question on what are JVM languages include Jython and JRuby. As the names imply, both these languages are considered as implementations of Python and Ruby designed specifically for the JVM. The compatibility of Jython is observed with the 2.
Clojure is the result of all this. It's a LISP functional programming language running on the JVM designed for concurrent programs.
One of the biggest reasons why Java is so popular is the platform independence. Programs can run on several different types of computer; as long as the computer has a Java Runtime Environment (JRE) installed, a Java program can run on it.
Why don't they write a new VM for a new language?
That one is easy:
Performance and Libraries
The JVM is rock solid and works from the tiniest Java SmartCard (ok, a tiny VM ;) to the biggest clustered super-computers you can imagine.
Because it is rock solid, there are entire countries where people have:
I'm developping commercial software in Java: we're selling on Windows and on OS X but we're all developping on Linux. And it just works. And it works on Solaris too, etc. And that's because we're targetting the JVM: goodbye portability issue. As long as the platform has a VM, the software shall work.
Then I can't believe anyone mentioned it yet: it is a very good start from a security point of view.
The Java VM is, by design, immune to buffer overrun/overflow. This is huge. This is actually huger than most people realize.
The only "Java" buffer overflow that I remember on Linux (that prompted me to upgrade due to security concern) was actually a buffer overflow leading to arbitrary code execution in... a C written lib (zlib if I remember correctly, back in the days Java on Linux was still defaulting to that lib).
Sure, for webapps buffer overrun/overflow leading to arbitrary code execution are not the most important vector of attack anymore (now that XSS and SQL injection have stolen the show). But in all the other cases buffer overrun/overflow are the source of most security issues.
The JVM is immune to that.
In addition to that thanks to its design it's easy to plug various tools on it like profilers and debuggers.
It is a very solid and secure (when used correctly) technology. That is why it is so widely used by both tech-savvy (Java is huge at Google, from GMail to their Android to GWT etc.) and tech-not-that-savvy companies.
It is actually arguable that Java's success comes from the JVM and that "Java the VM" is much more important than "Java the language".
The JVM is the biggest "language" success story of these last 20 years. And it is deserved. And it is here to stay :)
Because somebody else has already taken the trouble to make sure it runs well on every major platform.
If you write your own VM, you have to write one for Linux/Unix/BSD, one for Mac, and one for Windows, and you have to support the VM on all those platforms as well as supporting your language compiler and runtime libraries. If you use the Java VM, the first part is taken care of for you by Oracle, IBM and Apple.
Because with almost 20 years of effort the Java VM is
I mean, if i would plan to release a new language why shouldn't I use the JVM? Ok, there are others vms (llvm, parrot) but the JVM is estensively supported, known, and tested.
And it works also quite good! The lack of invokeDynamic
will be solved with the relase of Java7 so better than this..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With