如何查看IntelliJ IDEA用于编译代码的javac命令? [英] How can I see the javac command IntelliJ IDEA uses to compile my code?

查看:2260
本文介绍了如何查看IntelliJ IDEA用于编译代码的javac命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在IntelliJ IDEA中编写Java代码并运行它时,IntelliJ编译Java文件,提取类文件然后运行类文件。

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.

如何查看IntelliJ运行的javac命令行。我问它所以我可以看到IntelliJ是否在javac命令中添加了一些标志。

How can I see the javac command line that IntelliJ runs. I ask it so I can see whether IntelliJ adds some flags to the javac command.

推荐答案

IntelliJ IDEA无法运行 javac ,因此您无法看到命令行。

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

编译器API直接来自Java代码。如果 build.log <启用调试日志记录 / code>文件,你可以找到更多细节如何编译修改和依赖文件以及使用哪些选项。

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.

示例调试日志行:

[  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" 

这篇关于如何查看IntelliJ IDEA用于编译代码的javac命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆