且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Intellij IDEA Java类不会在保存时自动编译

更新时间:2023-09-18 16:14:16

更新

对于IDEA 12+版本,我们可以自动构建已编辑的来源,如果我们使用外部编译器选项。唯一需要的是检查编译器设置下的自动构建项目选项。

此外,如果您希望热部署,在应用程序运行时或者如果您使用的是Spring boot devtools,则应启用 compile.automake.allow.when.app.running 来自注册表。这将自动编译您的更改。

UPDATED
For IDEA 12+ releases we can build automatically the edited sources if we are using the external compiler option. The only thing needed is to check the option "Build project automatically", located under Compiler Settings. Also, if you would like to hot deploy, while the application is running or if you are using spring boot devtools you should enable the compiler.automake.allow.when.app.running from registry too. This will automatically compile your changes.

使用 ctrl + shift + A (或 + shift + A 在mac上)类型注册表一旦注册表窗口打开,找到并启用 compiler.automake.allow.when.app.running ,请看这里:

Using ctrl+shift+A (or +shift+A on mac) type Registry once the registry windows is open, locate and enable compiler.automake.allow.when.app.running, see here:



对于12以上的版本,您可以使用EclipseMode插件使IDEA自动编译保存的文件。请参阅: https://www.jetbrains.com/help/idea/2016.3/eclipse .html 了解从Eclipse迁移时的更多提示。


For versions older than 12, you can use the EclipseMode plugin to make IDEA automatically compile the saved files. See: https://www.jetbrains.com/help/idea/2016.3/eclipse.html for more tips when migrating from Eclipse.

推荐文章