Scala with ScalaFx: invalid or missing dependency

273 views Asked by At

After I switched from SDK Version scala-SDK-4.4.1-vfinal-2.11-win32.win32.x86_64 to Version scala-SDK-4.5.0-vfinal-2.11-win32.win32.x86_64 I´m getting some error messages in eclipse:

eclipse errors

Full error message:

missing or invalid dependency detected while loading class file 'Alert.class'. Could not access term Alert in package javafx.scene.control, because it (or its dependencies) are missing. Check your build definition for missing or conflicting dependencies. (Re-run with -Ylog-classpath to see the problematic classpath.) A full rebuild may help if 'Alert.class' was compiled against an incompatible version of javafx.scene.control. ageofscala Unknown Scala Problem

I´m getting 23 errors of that.

I´m using scalaFx in my project. Before I switched to the newer SDK, the project was running perfectly. Now it doesn´t even run with the older SDK version. The reason because I switched to the newer SDK was this error: Eclipse returns error message “Java was started but returned exit code = 1” So I added this line to the eclipse.ini file:

-vm C:/Program Files/Java/jdk1.8.0_25/jre/bin/server/jvm.dll

And here is my build.sbt :

scalaVersion := "2.11.8"

libraryDependencies += "com.typesafe" % "config" % "1.2.1"
libraryDependencies += "com.github.nscala-time" %% "nscala-time" % "2.12.0"
libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.4.4"
libraryDependencies += "com.lambdaworks" %% "jacks" % "2.3.3"
libraryDependencies += "com.typesafe.play" % "play_2.11" % "2.5.3"
libraryDependencies += "org.scala-lang" % "scala-swing" % "2.11.0-M7"
libraryDependencies += "org.scalafx" % "scalafx_2.11" % "8.0.92-R10"

Are there some version problems or something else? I tried to update the project to the newest Scala version ("2.12.1") and newest ScalaFx version ("org.scalafx" %% "scalafx" % "8.0.102-R11") but with no success... Can anyone please help me? Thanks!

1

There are 1 answers

0
Jarek On BEST ANSWER

Alerts were added in Java 8u40. You have 8u25. You need to update your version of Java to more recent one.