简体   繁体   English

无法在IntelliJ中运行Scala程序

[英]Cannot run a Scala program in IntelliJ

So I made a project in Scala -> Activator. 所以我在Scala-> Activator中创建了一个项目。 I am trying to run it but I cannot even select it, it has a main function. 我正在尝试运行它,但是我什至无法选择它,它具有主要功能。 When I press the alt+shift+F10 nothing happens at all. 当我按Alt + Shift + F10时,什么都没有发生。

The icon for the main.scala file also has some red thing in the bottom right corner, which I'm unsure what that means. main.scala文件的图标在右下角也有一些红色的东西,我不确定那是什么意思。

Also if I edit the file there is no star at the filename, like if it was unchanged. 另外,如果我编辑文件,则文件名没有星号,就像文件名没有变化一样。

Answering rather than deleting this question. 回答而不是删除此问题。 I solved the problem by creating a Maven project or by using sbt, it will not run right out of the gate like Java (coming from a Java background). 我通过创建Maven项目或使用sbt解决了该问题,它不会像Java(从Java背景产生)那样立即运行。

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

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