Ich bin neu in Scala und SBT, damit ich etwas offensichtliches vermisse.ScalaFX: HelloWorld Kompilierungsfehler
ich das Hello World Beispiel auf http://www.scalafx.org/docs/quickstart/
zu kompilieren versuchte, habe ich eine Datei build.sbt
enthält:
scalaVersion := "2.11.5"
libraryDependencies += "org.scalafx" %% "scalafx" % "8.0.0-R4"
und eine Datei src/main/scala/ScalaFXHelloWorld.scala
den Code aus gelinkten Seite enthält.
Wenn jedoch sbt run
läuft ich:
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
[info] Set current project to scalafx (in build file:/home/kvbx/Projects/ScalaFX/)
[info] Compiling 1 Scala source to /home/kvbx/Projects/ScalaFX/target/scala-2.11/classes...
[error] missing or invalid dependency detected while loading class file 'Color.class'.
[error] Could not access term javafx in package <root>,
[error] because it (or its dependencies) are missing. Check your build definition for
[error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
[error] A full rebuild may help if 'Color.class' was compiled against an incompatible version of <root>.
[error] missing or invalid dependency detected while loading class file 'Color.class'.
[error] Could not access term scene in value javafx,
[error] because it (or its dependencies) are missing. Check your build definition for
[error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
[error] A full rebuild may help if 'Color.class' was compiled against an incompatible version of javafx.
[error] missing or invalid dependency detected while loading class file 'Stage.class'.
[error] Could not access term javafx in package <root>,
...
...
Ich sbt 0.13.7 und 2.11.5 scala auf openjdk 1.8.0_31 auf Archlinux läuft
Enthält OpenJDK 8 JavaFX? Kommentare zur akzeptierten Antwort von [diese Frage] (http://stackoverflow.com/questions/18547362/javafx-and-openjdk) deuten darauf hin, dass dies nicht der Fall ist. – Jesper
Ich denke schon. In diesem Dokument heißt es: "Für JavaFX 8 (verteilt mit Java 8) müssen Sie eine Abhängigkeit von ScalaFX v.8 hinzufügen." – kvbx
Nun, ich denke du magst Recht haben. JavaFX ist nicht in meinen Distributionen OpenJDK8. Ich installiere jetzt openjfx von AUR. Und dann werde ich es noch einmal versuchen. – kvbx