Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is JVM open source code?

Tags:

java

jvm

Is JVM open source code? If not, how can I get the code of JVM?

like image 230
giri Avatar asked Jan 08 '10 07:01

giri


People also ask

Is JVM a code?

Simply put, JVM Code Cache is an area where JVM stores its bytecode compiled into native code. We call each block of the executable native code a nmethod. The nmethod might be a complete or inlined Java method.

Is JVM proprietary?

Sun of course owns the copyright for the Sun JVM, Hotspot, but this implementation is now licensed to the public under GPLv2, as part of OpenJDK. Further, Upul is correct that any company can implement the JVM Specification, and many have. Well-known implementations include Harmony, Jikes, and Kaffe.

What language is JVM written?

Supposing you're talking about the Hotspot JVM, which is iirc provided by Sun, it is written in C++. For more info on the various virtual machines for Java, you can check this link. javac, like most Java compilers, is written in Java.

Is JVM a hardware or software?

Technical definition: The JVM is the specification for a software program that executes code and provides the runtime environment for that code. Everyday definition: The JVM is how we run our Java programs. We configure the JVM's settings and then rely on it to manage program resources during execution.


1 Answers

It depends entirely on which JVM you use.

If you use the OpenJDK JVM, then you can get the source code from here.
If you use the Kaffe JVM, you can get the source from here.
If you use the Sun JVM version 6 or later, then you can get the source from here.

If you use a Sun JVM earlier than 6, then you can often get the source under an academic license. If you use an IBM, Oracle, HP, or other JVM, then the source is not open.

Update May 2013

The Version 6 source can still be accessed by the above link, or it can be accessed via this link. This latter link also includes a handy genealogy table that shows how the Oracle JDK and OpenJDK versions match with each other.

Additionally, a more up to date version of the Java 7 source can be found here. This also includes the fixes for the releases of Java 7 since GA.

And, of no surprise to anyone, the Java 8 sources can be found here.

like image 181
Paul Wagland Avatar answered Sep 23 '22 11:09

Paul Wagland