问题描述
我是Eclipse IDE的新手,问题是如何在默认情况下如何将Scala项目作为Scala应用程序运行?当我按⌘R键运行项目时,它总是询问如何以Scala或Java应用程序的形式运行它.有没有一种方法可以跳过此操作,并且默认情况下始终将其作为Scala运行?
我猜想它与启动配置有某种关系,但是当我尝试为项目进行新的启动配置时,它没有给我Scala的选项:只有Java applet和Java应用程序显示为选择./p>
感谢您的帮助!
窗口>偏好设置>一般>按键
向下滚动并选择运行Scala应用程序
将绑定编辑为⌘R
或任何您想要的内容.
这将更改整个工作区的绑定,因此不会区分Java和Scala应用程序.如果跑步者有一个可以打勾的框来选择默认值,那就太好了,但这是一个不错的解决方法.
I am a novice to the Eclipse IDE and the question is how can I run a Scala project as a Scala application by default? When I run the project by hitting the ⌘R key, it always asks how to run it, as a Scala or Java application. Is there a way to skip this and always run it as Scala by default?
I guess it's somehow related to the launch configuration, but when I try to make a new launch configuration for the project, it doesn't give me the option of Scala: only Java applet and Java application are shown as choices.
I appreciate your help in advance!
Window > Preferences > General > Keys
Scroll down and select Run Scala Application
Edit the Binding to ⌘R
or whatever you want.
This changes the binding for your whole workspace, so it doesn't distinguish between Java and Scala applications. It would be nice if the runner had a box you could tick to choose the default, but this is a decent workaround.
这篇关于默认情况下,如何在Eclipse IDE中将Scala项目作为Scala应用程序运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!