简体   繁体   English

单击“运行IntelliJ”时,Scala无法编译

[英]Scala does not Compile when clicking Run IntelliJ

Using InteliJ I have to hit Compile before I do Run otherwise the current code edits do not execute. 使用InteliJ,我必须先点击Compile,然后再运行Run,否则当前的代码编辑将无法执行。

How can I make it so scala files are compiled automatically so all I have to do is press Run like with Java? 我怎样才能使scala文件被自动编译,所以我所要做的就是像Java一样按Run键?

It might be important to note I am using scala files in a java project. 注意我在Java项目中使用Scala文件可能很重要。

I have made a macro to Save and Compile mapped to CMD+s 我做了一个要保存并编译到CMD+s

I would like a better solution. 我想要一个更好的解决方案。 As such, I am willing to wait for an answer before accepting my own. 因此,我愿意等待答案,然后再接受自己的答案。

Edit your Run Configuration and add the "Make" step to it. 编辑您的运行配置,并在其中添加“制作”步骤。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM