2

I cannot run any scala project from the IntelliJ IDEA. I am completely new to IntelliJ. The option doesn't appear anywhere in the IDE. I am not sure why as it seems as if I have everything installed properly. My OS is 5.4.15-2-MANJARO.

I try to add it from 'add configurations' but that has nothing useful in it.

my code

add configurations menu

jdk and sdk versions

SecretAgentMan
  • 2,856
  • 7
  • 21
  • 41
  • tst is not a valid top level package. You should create a main package and a test package under src – sinanspd Feb 03 '20 at 20:13
  • 1
    if you want make scala application you need installed sbt and java at least 8. After that you can create project selecting sbt project in Intellij. If you want to make your application executable you can go 2 ways: Create class with main function: `class Application228 { def main(args: Array[String]): Unit = println("hello word!") }`. Or create `Object HelloWorldApp extends App { println("hello word!") }` and after that play button will appear on the left side of class or Object. – Boris Azanov Feb 03 '20 at 20:14
  • 1
    @BorisAzanov it should be an object with `main` function, not class. – Dmytro Mitin Feb 03 '20 at 23:05
  • 1
    @BorisAzanov Please post answers as answers not long comments. – jrook Feb 03 '20 at 23:40
  • In the first image, try removing the `class` part and see if the run options and buttons (small green buttons besides the line numbers) appear. – jrook Feb 03 '20 at 23:44
  • @DmytroMitin you're right, object instead of class – Boris Azanov Feb 04 '20 at 07:20
  • Yep, I figured out that it should be an object instead of a class. It works properly now. Thanks. – SayoriBlyat Feb 04 '20 at 21:03

0 Answers0