[Resolved] No "Run" option for Scala in Intellij IDEA CE 2018.1.

I have followed instructions from https://docs.scala-lang.org/getting-started-intellij-track/getting-started-with-scala-in-intellij.html  (java 1.8, scala plugin v2018.1.8)

to get started with Scala. The problem is that the Run Configurations are empty and I can only compile the code (IDEA project model; but the same is true for sbt), no option to run it. Under "Edit configurations" there is: Scala Console, Scala Script, Scala Test.

Which one I should configure and how?

Thank you.

 

p.s. I'm on Windows 10

[Update]: The problem was on my side. The JDK was not in the system path.

 

2 comments
Comment actions Permalink

This does not fix this for me, I and many others have the same issue. For me I'm on Ubuntu 18:04 All sources paths compilers are set, creating a new Scala Project with Intellij template (not lightable or sbt) following tutorials and there is no Option to run a Singleton (Object) class or any script. Im beginning to think this is a bug (which was opened several releases ago) yet Intellij has no fixes.

object Test {
def main(args:Array[String]) =println("Hello World")
}


No run option available anywhere, no default run config. This is the same with several users in our dev group.

And before you ask again

  • JDK fine on system path
  • SCALA COMPILER correct
  • src filder marked as sources root
  • project setup correctly (with the Intellij new project wizard)

In fact it appears as if the issue is even deeper. Both new SBT projects and IntelliJ projects load the sdks but neither are able to run a Straight Scala File. In fact this reffirms the issue lies with IntelliJ

As a new SBT Scala project:

class Main {
def main(args: Array[String]): Unit = {
println("Hello World!")
}
}


No run option

0
Comment actions Permalink

The problem in my case was installed options. When I have installed Intelij I didn't choose Scala plugin third screen ( under featured plugins option when installing IDE). Later didn't help when I installed manually plugin as if Intelij is not detecting plugin the same was as the featured plugin... So reinstall helped with featured plugin checked this time!

0

Please sign in to leave a comment.