javac-The Java Compiler

   

javac ” The Java Compiler

The javac program is the tool you use to compile .java files into class files that can be run by the interpreter. The command is executed like this:

 javac <options> <sourcefiles> 

Table B.2 lists the Java compiler options.

Table B.2. Java Compiler Options
Option Description
-g Generates all debugging information.
-g:none Doesn't generate any debugging information.
-verbose Outputs messages that describe what the compiler is doing.
- deprecation Outputs source locations where deprecated API's are being used.
-classpath < path > Overrides the default CLASSPATH environment variable and specifies a new path to look up classes. Make certain you always include library classes, such as jdk1.2\ jre\ rt.jar .
-d <directory> Specifies the directory to place the resulting class files in. Note the directory specifies the root location.
-nowarn Turns off warnings. When this is turned off, the compiler does not generate any warning messages. Note: This option is available in JDK 1.1 and above, but not in JDK 1.0.
-O Turns optimization on. This causes all static , final , and private methods to be placed inline. Although this can result in faster performance, it might also cause your class files to become larger.
-target <release> Generates class files for a specific VM.
-sourcepath Specifies where to find input source files.
   


Special Edition Using Java 2 Standard Edition
Special Edition Using Java 2, Standard Edition (Special Edition Using...)
ISBN: 0789724685
EAN: 2147483647
Year: 1999
Pages: 353

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net