Created: 2023-08-27 10:34
Status: #concept
Subject: Programming
Tags: Java Bytecode Virtual Machine

Java Virtual Machine

The runtime environment that comes with the Java JDK which is compatible across platforms.

  • provides hardware platform specifications for compilation.
  • reads compiled Bytecode which are platform-independent to execute code.
  • manages memory for the programmer.
  • provides a Garbage collector on runtime.

Running Java Programs

We use the java [CLASS_FILE] command to execute a program.

  • in order to create a CLASS_FILE, we need to use javac [JAVA_FILE] first.

$ javac Hello.java
$ java Hello.class
Hello World!

References