Java Applications in a Nutshell
Java programs written in a file with extension “.java”.
Applications are .java files with a main() method. This is called by the Java system.
Compile and run a Java application (using bytecodes):
- Run the compiler on a .java file:
javac MyProgram.java
producing a file of Java byte code, MyProgram.class
- Run the interpreter on a .class file:
java MyProgram
which executes the byte code
The tools javac and java are part of JDK.