0

I recently installed the latest version of Scala IDE from the link provided on its website for Eclipse, and imported scalafx version 2.22 jar and then installed SBT (the latest version). Then I was trying out the following code from scalafx.org :

import scalafx.Includes._
import scalafx.application.JFXApp
import scalafx.scene.Scene
import scalafx.scene.paint.Color
import scalafx.scene.shape.Rectangle
object HelloStageDemo extends JFXApp {
stage = new JFXApp.PrimaryStage {
title.value = "Hello Stage"
width = 600
height = 450
scene = new Scene {
  fill = Color.LightGreen
  content = new Rectangle {
    x = 25
    y = 40
    width = 100
    height = 100
    fill <== when (hover) choose Color.Green otherwise Color.Red
  }
}
}
}

However, I wasn't able to run as I got built errors of the following :

error while loading AccessibleAction,invalid distance too far back
error while loading CycleMethod,invalid LOC header(bad signature)
error while loading JobSettings,invalid LOC header(bad signature)
HelloStageDemo's tests not built due to errors in dependent scope(s) main

The error can be rid by not importing the Includes object (import scalafx.Includes._ ) I tried to google search the problem, but I couldn't find any explanation about it.. And so I tried this code on another machine without SBT installed, and it works there even when including the import.scalafx.Includes._ line.. Both of the machines uses JVM version 8.. So is this problem related to my SBT installed on my machine, or is it other type of problem? Also what do the errors mean? Thanks in advance

atjua
  • 541
  • 1
  • 9
  • 18
  • 2
    I'm going to guess you have a corrupted ScalaFX JAR. I would try redownloading the JAR to see if the problem persists. – Gavin Schulz Oct 24 '15 at 07:59
  • @GavinSchulz , yes apparently it was a corrupted ScalaFX JAR that I downloaded. Redownloaded it, and now it works! Thanks a lot. :-) – atjua Oct 24 '15 at 08:22

0 Answers0