ayvango
ayvango

Reputation: 5977

setting sbt scalafx project

javafx is now in oracle-jdk.

scalafx gives delicious examples in its repository

The main questions I'm not being able to answer is "How to get started with scalafx"?

How can I add scalafx libary dependencies on my sbt project?

Upvotes: 7

Views: 1435

Answers (3)

pagoda_5b
pagoda_5b

Reputation: 7373

ScalaFX is soon to reach a stable release state. As I write this you can find the published artifacts for version 1.0.0-M2 on the maven central repo

Adding the dependency to your sbt build should suffice

libraryDependencies += "org.scalafx" %% "scalafx" % "1.0.0-M2"

Upvotes: 4

Rajmahendra
Rajmahendra

Reputation: 3224

@ayvango i have created a giter8 scalafx project template.just use

  g8 jugchennai/scalafx.g8

You just need a new version of JDK, Giter8 and SBT. Dependency settings for javafx, scala, scalafx are predefined! IDE support also available.

URL : https://github.com/jugchennai/scalafx.g8

Upvotes: 0

Rogach
Rogach

Reputation: 27200

I did it the following way: I cloned the scalafx repository, build the jar using sbt package, then just copied the resulting jar into lib/ directory of my project. Make sure to reference your ${JAVAFX_HOME}/lib/jfxrt.jar as well.

If you want to use local maven, just run sbt publish-local in your scalafx dir, then add the following dependency to your project:

"org.scalafx" % "scalafx" % "1.0-SNAPSHOT"

(Look up that version in scalafx build.sbt, I pasted what was in mine)

Upvotes: 3

Related Questions