Creating a JAR File - Oracle Documentation The basic format of the command for creating a JAR file is: jar cf jar-file ... You should be aware of this when you are using JAR files in a build environment.
Compiling, Executing, and Jar'ing Java Code where java takes the name of a Java class, T, not the name of the file it is in, T. java. The java interpreter looks for T.class and then begins execution at the main( ) ...