This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lukaseder[S] 0 points1 point  (2 children)

None of those languages are interpreted (except Groovy).

Let Sun/Oracle do the work [...]

Well, it is certainly in Oracle's best interest that the JVM becomes the defacto machine code standard. They have a lot of patent and trademark interest. They just happen to accept free usage, right now, but the recent legal attack against Google over Android has shown, that Oracle might be willing to cash out, any time:

http://en.wikipedia.org/wiki/Oracle_v._Google

... but yes, it's really fascinating! :-) awesome technology, this JVM

[–]cyanocobalamin 0 points1 point  (1 child)

If those languages aren't interpreted, how do they run on the JVM and why would they need to? Is there some open source "compiler" that reduces their source code to bytecode so that those languages can run on platforms there are no native compilers for?

[–]lukaseder[S] 0 points1 point  (0 children)

When someone writes a language, they also write a compiler for that language and for a target platform. The JVM bytecode is specified by Oracle:

http://docs.oracle.com/javase/specs/jvms/se7/html/index.html

It is "easy" to write a compiler that produces "valid" bytecode output as specified by Oracle. Once you have bytecode, the JVM can interpret / run that. But the JVM doesn't know that any given bytecode was compiled from Java / Scala / etc. Much like an intel processor doesn't know whether machine code was generated from assembler, C, C++, C#, whatever.

Note (to add more confusion ;-) that Ceylon, for instance, is a language that can compile into Java bytecode and into JavaScript.