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

查看:43
本文介绍了如何查看 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 文件启用调试日志,您可能会发现更多详细信息如何编译修改后的和依赖的文件以及使用哪些选项.

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天全站免登陆