I installed the Scala IDE for Eclipse and created a HelloWorld object in the package sample, all using the Eclipse Scala perspective. Now when I click run I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: scala.Predef$
at conformal/sample.HelloWorld$.main(HelloWorld.scala:7)
at conformal/sample.HelloWorld.main(HelloWorld.scala)
Caused by: java.lang.ClassNotFoundException: scala.Predef$
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:769)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1055)
... 2 more
which I can only assume means that the scala jar file is not available. Which seems super strange. Also according to the Package Explorer it seems to be listed. Must I still add it to the run configuration somehow?
This is what hte PAckage explorer looks like
I have tried two version of Java:
- adoptopenjdk12-openj9
- adoptopenjdk13-openj9
module-info.java
file fix your issue? – howlger