Java Command-Line Essentials
All of the following commands assume the Java compiler (javac) and interpreter (java) are installed in an accessible directory in the current operating environment. This is true on CSL lab machines, and will be true when Java is properly installed on other machines.
javac file.javawhere "file".java is the name of the Java source file.
javac file1.java file2.java . . . filen.javawhere "filei.java" are the names of the Java source files. The names may contain any wildcard characters recognized by the operating system, for example the following command compiles all files with the .java extension in the current directory:
javac *.java
java classnamewhere classname is the name of Java class containing the main method of the program to be executed.
The Sun Java site has complete documentation on javac, java,
and other Java tools and utilities. The location is
http://java.sun.com/javase/6/docs/technotes/tools/