In which language is JVM written

In which language are the Java compiler and the JVM written?

In which languages ​​are Java Compiler (), the virtual machine (JVM) and the launcher written?

The exact formulation of the question is slightly misleading: it is not "the JVM" or "the compiler" as they are multiple JVM providers (jrockit is one, IBM is another) and multiple compilers out there.

  • The Sun JVM is is written in, although it doesn't have to be - the JVM as it runs on your computer is one platform-dependent executable and therefore could originally written in any language. For example, the original IBM JVM was built in Small talk written.

  • The Java libraries (, etc., often referred to as the Java API) are themselves written in Java, although methods marked as were written in or.

  • I believe that the Java compiler provided by Sun is also written in Java. (Although there are again several compilers)

The very first Java compiler was developed by Sun Microsystems and written in C using some C ++ libraries. Today the Java compiler is written in Java, while the JRE is written in C.

We can imagine how the Java Compiler was written in Java:

The Java compiler is written as a Java program and then compiled using the Java compiler written in C (Java Compiler). So we can use the newly compiled Java Compiler (written in Java) to compile Java programs.

From Java Docs

The compiler is written in Java and the runtime in ANSI C.

This link should answer your question

It appears that the compiler is now written in Java, but the runtime is written in ANSI C.

In principle almost everything, usually C

Jikes RVM, a self-hosting JVM that is used extensively for research purposes, is written in Java. It's not the person running on their desktops, but it's high on my "Now Let's Show the General Power of Language" list.

For example, let's say you are talking about the hotspot JVM provided by Sun. It is written in C ++. For more information on the various virtual machines for Java, see Link. javac is written in Java like most Java compilers.

How to fix Java.lang.UnsupportedClassVersionError: Unsupported major version

javac is not recognized as an internal or external command, executable program, or batch file

How can I tell if I'm using a 64-bit JVM or a 32-bit JVM (from a program)?

Not enough space could be reserved for the pile of objects

Error: Java: invalid source version: 8 in Intellij. What does that mean?

What does -XX: MaxPermSize do?

Ant warning: "'Include runtime' was not set"

PermGen elimination in JDK 8

How do I write a correct micro-benchmark in Java?

Android Studio - No JVM installation found

How do I get a random number in Kotlin?

What actually causes a stack overflow error?

-Xss JVM Option - What Exactly Does It Do?

Eclipse states that "Java started but returned exit code 13".

javac: command not found

Set a JVM time zone correctly

Why should you ever implement finalize ()?

-XX: MaxPermSize with or without -XX: PermSize

What does the JVM flag CMSClassUnloadingEnabled actually do?

GC overhead limit exceeded

Content dated before 2011-04-08 (UTC) is licensed under CC BY-SA 2.5. Content dated from 2011-04-08 up to but not including 2018-05-02 (UTC) is licensed under CC BY-SA 3.0. Content dated on or after 2018-05-02 (UTC) is licensed under CC BY-SA 4.0. | Privacy