This page contains a lecture on the
java tool (command).
java is a program that can execute (run) programs written in Java. java actually executes classes as found in so called class files (see bytecode above). The argument to
java can be the qualified name of a compiled class which contains the special "main method". The
java command starts the virtual machine (JVM) which will read the corresponding class file and execute the instructions of the bytecode in the file.
If you want to execute the class Hello, as found in the file
Hello.java, in the package
$ java org.exampleproject.Hello
Note, that the Hello class must define a special "main" method in order to be possible for the JVM to execute.
Slides and videos
- Presentation: TODO
- Source code: TODO
- Video: TODO
Other pages on this Wiki about