Scala IDE Error - Could not find / load main class

I am using Scala IDE 4.4.1. Using jdk 8. When I try to start the Scala program, I get the error "Error: could not find or load an example of the main class. Credit".

+4
source share
5 answers

I was stuck with the same error a few days ago. In my case, it was the incompatibility of my JDK and the selected target JVM for my Scala project.

To check the current version of Java, run java -versionat a command prompt. To check the goal of the JVM project in Eclipse, go to "Project> Properties> Scala Compiler" and check the target JVM (select the same version as your current Java).

Hope this helps.

+3
source

You should write an object instead of a class

+1
source

, . , , - , . , ​​, .

0

Scala Eclipse IDE,

Scala → Scala Installation, Scala .

, .

0

, . scala , , scala . scala " scala". - scala , , , jar, ( ) .

0

Source: https://habr.com/ru/post/1655343/


All Articles