Compiler-javac.exe

Source: Internet
Author: User
Tags command line root directory

2.3 Javac Compiler

The Javac compiler reads the Java source code and compiles it into byte code, and the command line that invokes Javac is as follows:

C:\>javac Options Filename.java

Notably, unlike the Java interpreter, the Javac compiler expects the file it is compiling to have an extension. Java. The following table is the command line

Options feature

-classpath path This option is used to set the path on which the javac looks for the class that needs to be invoked. The path is a semicolon-separated list of directories.

-D Directory This option specifies a root directory. This directory is used to create the number of directories that reflect the package inheritance relationship.

-G This option opens the debug table in the code generator, which can be used to generate the byte code later.

-nowarn This option prevents the compiler from generating a warning.

-o This option tells Javac to optimize the code generated by inline static, final, and Privite member functions.

-verbose This option tells Java to display information about the compiled source files and any called class libraries.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.