Java Interpreter reads Java byte code and executes them on the JVM running on different target systems. Java byte code is machine independent and can run on any machine where the JVM runs.(Write Once Run Anywhere)
To get the byte code, we need to compile the java program. The Java compiler, javac, takes the Java source .java file and translates it into instructions that the JVM can understand. The compiler puts these instructions into a Bytecode .class file.
Sample Java Source code .java file
Java interpreter interprets the byte code and translates it to the machine native code that can be executed on JVM.
The Java VM is implemented by a Java interpreter i.e the java tool. Java interpreter takes the bytecode file and executes the instructions by translating them into instructions that the target computer can understand.
The java tool launches the Java Application. It does by starting a Java Runtime Environment(JRE), then loading a specified class, and by invoking that Java class’s main method. The main method is the entry point for the Java application.
Java Tutorial on this website:
For more information on Java, visit the official website :