23.3 The Java Runtime Environment
The Java interpreter java executes the Java bytecode in the runtime environment. For this task, the interpreter looks for the special static main(String[]) method in the class file passed as a parameter. A general call of the interpreter can be written in the following way:
$
java [ options ] class name [ arguments ]
If the class is declared in a package, the name of the class must be fully qualified. For example, if the Main class is located in the package com.tutego (i.e., in the subdirectory com/tutego), the class name must be com.tutego.Main. The runtime environment must be able to find the required classes. Like the compiler, the JVM evaluates the CLASSPATH environment variable and allows the classpath ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access