How can I see the javac command IntelliJ IDEA uses to compile my code?

后端 未结 3 762
长发绾君心
长发绾君心 2021-01-05 06:54

When I write a Java code in IntelliJ IDEA and runs it, IntelliJ compiles the Java file, a class file is extracted and then the class file is run.

How can I see the

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-05 07:34

    IntelliJ IDEA doesn't run javac, therefore you can't see the command line.

    Compiler API is used directly from Java code. If you enable debug logging for build.log file, you may find some more details how the modified and dependent files are compiled and what options are used.

    Sample debug log line:

    [  41011]  DEBUG - s.incremental.java.JavaBuilder - Compiling chunk [stopme] with options: "-g -deprecation -proceedOnError -encoding UTF-8 -source 1.8 -target 1.8 -proc:none" 
    

提交回复
热议问题