Skip to content
UoL CS Notes

Running Java Code

COMP122 Lectures

Java is an interpreted language that compiles into bytecode in order to make optimisations. To run a java program you would complete the following steps:

  1. Compile a source code file Hello.java with javac Hello.java. This will create a bytecode file Hello.class.
  2. Start the JVM and run Hello.class with java Hello.