Java Virtual Machine
Java Virtual Machine
In this post we discuss the Java Virtual Machine in more detail to help familiarize you with the inner workings and hopefully give you a better understanding of Java. We will discuss what the Java Virtual Machine is, what the typical Java workflow is and some of the JVM languages which leverage the huge installed Java code base.
What’s Covered
- What is the Java Virtual Machine
- Typical Java Workflow
- JVM Languages
- Java Workflow using JVM Languages
- Well-Known JVM Languages
- JVM References
What is the Java Virtual Machine
The Java Virtual Machine is the centerpiece of the Java platform. The Java Virtual Machine or JVM is a software implementation of a computer. Its main job is to interpret “compiled” Java binary code (bytecode) so that it may run the Java program’s instructions on the host machine. The Java Virtual Machine itself is only familiar with bytecode and more specifically the binary format of class files. It has no knowledge of the Java language itself. As a matter of fact, if you created a new language that produced compatible bytecode for the JVM it work just fine.
Typical Java Workflow
In order for us to be able to run our high level Java code on the host system the Java source must go through the typical build process. During this build process our source code (*.java) files are converted to Java bytecode (often times in *.class files). At this point our code (bytecode) is in a state that is most portable to all environments that support the JVMs. This bytecode is an abstract machine language that is ultimately executed by the Java virtual machine.
When running our application on the host system we will pass our Java bytecode to the Java virtual machine. It must go through the class loader, which will loads all imports and dependencies and performs the linking and verification, and then properly initializes the variables to the proper starting values.
Now that our bytecode has gone through the Class Loader and Bytecode Verifier it is ready to get to the interpreter. The interpreter in JVM will begin compiling the bytecode at runtime using their just-in-time compilter (JIT compiler). This step may add a small delay during thre initial application startup but will generally improve the performance of the application when compared to the standard interpreted version.
JVM Languages
Java Workflow using JVM Languages
Nowadays, the Java Virtual Machine (JVM) isn’t just for Java anymore. There are hundreds of languages that produce JVM compatible bytecode in class files. The basic premise is that as long as you can produce bytecode that is compliant with the Java virtual machine specifications and produce (*.class) files we will be able to leverage the huge user installed base.
Well-Known JVM Languages
- Scala
- Groovy
- Clojure
- Ceylon
- Jython
- JRuby
- Nashorn
- Jacl
- Fortress
- Nice
- X10
JVM References

Core Java Related Tutorials
- Base64 Encoding and Decoding Examples in Java 8
In this tutorial we will discuss how to Encode and Decode using Base64 using Java 8, which now finally has native Base64 support. - Base64 Encoding and Decoding Examples in Java using Google Guava
This tutorial will introduce how to Encode and Decode using Base64 using Google’s Guava Project Open Source library. - Base64 Encoding and Decoding Examples in Java using Apache Commons
This tutorial will introduce Base64 encoding and decoding examples using the Apache Commons Codec library. - Custom Number Formatting in Java
In this example we will show you how to use the NumberFormat and DecimalFormat classes to format numbers using special patterns. - Custom Date Formatting in Java
In this example we will show you how to use the SimpleDateFormat class to format Date objects using special patterns to better fit the needs of the application.
Please Share Us on Social Media






Leave a Reply