What does it really mean when you say "This language runs on JVM"?
Asked Answered
K

4

7

I have been hearing a lot lately regarding Scala, Clojure, etc which is supposed to run on JVM. Does this means that those languages are implementing the Java API underneath? What does it mean for a language to run under JVM?

Thanks.

Kavanaugh answered 5/10, 2011 at 2:45 Comment(0)
T
8

It means that these languages can be compiled into Java bytecode, which the JVM executes.

Taking answered 5/10, 2011 at 2:49 Comment(0)
H
6

It means that the language compiles down to JVM byte code at some point. The language doesn't need to implement the Java API; the Java API is already there (more or less all the time).

It just means if you have a JVM you should be able to run the language without another VM (although you'll need whatever class files the language compiler and libraries need, obviously).

Higgledypiggledy answered 5/10, 2011 at 2:48 Comment(0)
D
4

There is a Virtual machine that java runs one (JVM ),which abstracts away more machine level worries. These languages just use it as an intermediate language oppose to writing architecture specific instructions.

Debtor answered 5/10, 2011 at 2:49 Comment(0)
A
2

Usually, it just means that you have to install JRE to make sure they can execute.

And usually they don't require JDK, which is used to compile .java code into .class byte file. Instead, they provide their own compiler which runs on the JRE you have installed.

So in summary, you just need a runtime support Java (some specific version).

if you need an in depth information: [email protected]

Amour answered 5/10, 2011 at 3:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.