2012-04-08

SceneBuilder 1.0 on Linux

SceneBuilder 1.0 for JavaFX 2 has been out for, well, a couple of hours. Unfortunately it is only available for Windows and (surprise, surprise, at least for me) Mac OS X.
Oracle promises to deliver for Linux later, but "I want it all and I want it now".

So here is how to get SceneBuilder running in Linux.
  1. Create a directory where you want to install SceneBuilder.
  2. Download the Mac OS X version of SceneBuilder from Oracle.
  3. Unpack the dmg-file with 7z
    7z x javafx_scenebuilder-1_0-beta-b32-macosx-universal-26_mar_2012.dmg
  4. You'll get 8 files numbered from 0 to seven. Now unpack 4.hfs
    7z x 4.hfs
  5. Now copy all the jars from
    JavaFX Scene Builder 1.0/JavaFX Scene Builder 1.0.app/Contents/Resources/Java
    to the directory you created in 1. 
  6. To start SceneBuilder just run java with
    java -cp /opt/javafx/rt/lib/jfxrt.jar:javafx-beans-dt.jar:javafx-designtime.jar:SceneBuilder.jar com.oracle.javafx.authoring.Main
    Note: My JavaFX installation (JavaFX 2.1 build b19) is in /opt/javafx. You have to change this to match your system.
  7. Voilá : 
Unfortunately SceneBuilder is not yet usable (at least on my system).After a couple of seconds and mouse movements the scene literally turns black.

Maybe it's a bit early to try this with the lates beta build on Linux but I surely hope JavaFX will not break the Java WORA principle and this gets sorted out before the official release.