6, Javac command detailed

Source: Internet
Author: User

Javac[Options] [SourceFiles] The [@files] parameters can be arranged in any order.Optionscommand-line Options.SourceFilesOne or more source files to compile (for example, Myclass.java).@filesOne or more files that list the source files. First, view the command
-G Generate all debugging information
-g:none Do not generate any debug information
-g:{lines,vars,source} Generate only some debugging information
-nowarn Do not generate any warnings
-verbose Output messages about the actions that the compiler is performing
-deprecation Output source location using outdated APIs
-classpath < paths > Specify where to find user class files
-CP < paths > Specify where to find user class files
-sourcepath < paths > Specify where to find the input source files
-bootclasspath < paths > Overwrite the location of the boot class file
-extdirs < catalogue > Overwrite the location of the installed extension directory
-endorseddirs < catalogue > The location of the standard path that overrides the signature
-D < directories > Specify the location where the generated class files are stored
-encoding < coding > Specify the character encoding used by the source file
-source < version > Provides source compatibility with a specified version
-target < version > To generate a class file for a specific VM version
-version Version information
-help Summary of Output Standard options
-X Output non-standard options for feeds
j< logo > Pass < flag > directly to the runtime system
- D is to specify the output directoryFor example: javac-d./classes Helloworld.java means to place the Helloworld.java compiled bytecode file in the classes subdirectory of the current directory "note": ①: If the specified directory does not exist, Then the successful ② will not be created: if Helloworld.java has the package name and the package name is MyJava.study.day01, then the Helloworld.class file will be placed in: Current directory/classes/myjava/ Under the Study.day01/folder, automatically created if no path is changed

6, Javac command detailed

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.