简体   繁体   中英

Issue about Intellij IDEA with scala

I have a scala project but I don't know how to run it : 在此处输入图片说明

This is an java project and it has a button in main Method line: 在此处输入图片说明

my project is this : 在此处输入图片说明

what should I do to find the button to run my scala program

there is no run button 在此处输入图片说明

As I cannot comment, I will write here: you must point the scala class and right click on it, and then you have the Run. In the pictures you are trying to run the java class

Few things: a) Check to make sure, your source directory is included as module ie File > Project Structure. In the attachment below you see my modules 在此处输入图片说明

b) Check to make sure you have included your scala library, I believe you have this setup. 在此处输入图片说明

c) Last resort, see if you can add your object as Application ie Run > Edit Configuration & the following 在此处输入图片说明

Hope this helps, enjoy!

You need a scala plugin to run a scala file. And find more at the get started documentation of idea.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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