IntelliIdea - Cannot see scala in add framework support
Answered
I want to run scala code in IntelliJ Idea.
I donot see option scala in Add Framework Support. Therefore i don't see option to create scala class.
I had posted the same question on StackOverFlow but i couldn't get answer.
Please suggest how to do it?
Please sign in to leave a comment.
Your source root is not configured correctly, please see https://www.jetbrains.com/help/idea/configuring-content-roots.html. `src/main/scala` directory needs to be configured as the Sources root (marked in blue in the project view), you can right click on this directory to mark it as such.
If your project is Maven based, you need to update the pom.xml configuration so that IDE knows the project has Scala source roots: https://bl.ocks.org/tyrcho/a4c0f0240e52f7e0802a.
Relevant lines from this sample:
You cannot see Scala in Add Framework support because it's already added and the issue is with the source roots configuration, not with the framework.
Thanks Serge,
It works.
You can install the Scala plugin from plugin option, then restart the IDE and it will be available under Groovy. I faced same problem and this worked, Hope it will work for you as well.
Go to File->Settings->Plugins->Search "Scala"-> click install->Restart the IDE
Now follow the previous steps you followed "Scala" will be available in the "Add Framework Support" option.