좋은 하루! 도와주세요, 제발. 나는 더블 클릭 messge 후, jar 파일을 구축 할 것입니다scalaFX 독립 실행 형 jar 파일
sbt> package
후이 예
sbt> run
그것은 모든 플레이 좋아요입니다에게, 시동 :
Error: A JNI error has occured, please check your installation and try again.
스칼라 버전 : 2.12.4을. JVM : 1.8.0_152. ScalaFX : 8.0.102-R11
hello.scala :`
package hello
import scalafx.Includes._
import scalafx.application.JFXApp
import scalafx.application.JFXApp.PrimaryStage
import scalafx.scene.Scene
import scalafx.scene.paint.Color._
import scalafx.scene.shape.Rectangle
object HelloStage extends JFXApp {
stage = new JFXApp.PrimaryStage {
title.value = "Hello Stage"
width = 600
height = 450
scene = new Scene {
fill = LightGreen
content = new Rectangle {
x = 25
y = 40
width = 100
height = 100
fill <== when(hover) choose Green otherwise Red
}
}
}
}
build.sbt :
name := "Scala"
organization := "scalafx.org"
version := "1.0.5"
scalaVersion := "2.12.4"
scalacOptions ++= Seq("-unchecked", "-deprecation", "-Xcheckinit", "-encoding", "utf8")
resourceDirectory in Compile := (scalaSource in Compile).value
libraryDependencies ++= Seq(
"org.scalafx" %% "scalafx" % "8.0.102-R11",)
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)
fork := true
감사합니다. 대단히 !!!!! 이거 OK! – Dima