Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How the ​ Javac compiler reads the Java source code

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article is about how the Javac compiler reads Java source code. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

The Javac compiler reads the Java source code and compiles it into bytecode. The command line to call Javac is as follows:

C: > javac options filename.java

It is worth noting that, unlike the Java interpreter, the Javac compiler expects the file it is compiling to have the extension .Java. The command line is shown in the following table

Option function

-classpath path this option is used to set the path where Javac looks for the class to be called. The path is a list of directories separated by semicolons.

-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 allows you to generate bytecode later.

-nowarn this option prevents the compiler from generating warnings.

-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 file and any called class libraries.

Thank you for reading! This is the end of the article on "how the Javac compiler reads the Java source code". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report