Appendix G. Tool Summary
In this summary, we use a monospaced font for actual commands such as javac. An italic font denotes descriptions of tool command components such as options. Items enclosed in brackets [...] are optional. Items separated by vertical bars | are alternatives. Do not include the brackets or vertical bars when typing the commands.
The Java Compiler
javac [options]sourceFile1|@fileList1sourceFile2|@fileList2 ...
A file list is a text file that contains one file name per line. For example,
File Greeting.list
1Greeting.java2GreetingTest.java
Then you can compile all files with the command
javac @Greeting.list
The Java compiler options are summarized in Table 1.
Table G.1. Common Compiler Options
Option | Description |
|---|---|
| The compiler is to look for classes on this path, overriding the Each location is a directory, JAR file, or ZIP file. Locations are separated by a platform-dependent separator ( |
| The compiler is to look for source files on this path. If not specified, source files are searched in the class path. |
| The compiler places files into the specified directory. |
| Generate debugging information. |
| Include information about all classes that are being compiled (useful for troubleshooting). |
| Give detailed information about the usage of deprecated messages. |
| Carry out additional ... |
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