<< Let 6u10 Be Java 7 | Home | Upgraded Weblog Software To Pebble 2.3.1 >>

Watch JavaFX SDK Run---On Linux

[Update] See Using JavaFX 1.0 On Linux for updated instructions for the JavaFX SDK 1.0 release.

Sun released the JavaFX Preview five days ago. One of the key deliverables of this technology preview release is the JavaFX Preview SDK (the other three being a NetBeans bundle, Project Niles, and JRE 6u10).

The preview release is met with general enthusiasm from the Java camp, with predictable "too little, too late" chants from certain corners of the RIA world. I believe Kirk Pepperdine's analysis to be on the mark:

Kirk Pepperdine: JavaFX has already made a big difference in how client side Java works and this promises to get better. Stephan Janssen (www.parleys.com) demonstrated in a keynote at both JavaONE and TSSJS-Europe that JavaFX can provide an experience that rivals Adobe Air. And we can't forget that JavaFX has the added advantage that is it Java and as such will have all of the rich Java APIs available to it. With this in mind, I'm pretty optimistic that JavaFX, being free and open, will become the preferred choice for building rich clients if....

One thing that people noticed right away is the fact that the JavaFX Preview SDK is available for Windows and Intel/Mac, but not Linux or Solaris. A cursory examination of the Windows and Mac OS X version of the JavaFX Preview SDK reveals that they are almost identical in content. The only differences are in native libraries and startup scripts/executables. The native libraries fall into the area of native audio/video playback and (for Windows) some 3D effects.

"Hmm, I bet if I download the zip version of the Mac OSX release, it would work on Linux!"

And guess what? It—most of it anyway, native video playback being the exception—does work.

Here's what I did:

  • Download the zip version of the Mac OSX release (it contains start-up shell scripts that the Windows release does not)
  • Unzip it in /opt to get a /opt/javafx-sdk1.0pre1/ tree
  • Add /opt/javafx-sdk1.0pre1/bin to $PATH
  • Set $JAVAFX_HOME to /opt/javafx-sdk1.0pre1

With this setup, all the little snippets of JavaFX Script code I've written to test out the language features compile and run fine. What's more, the five sample programs that come with the SDK also run fine. Here's a screen cast of them being run on my Debian 4.0 GNU/Linux amd64 (Linuxy format, you may need to download VLC to view):

JavaFX Preview SDK running on Linux

Note that an official Linux version of the JavaFX SDK is promised for release 1.0. This post is only meant for the impatient Linux folks out there who just want to try some of the stuff out.

Tags :


Re: Watch JavaFX SDK Run---On Linux

Can you try something with transparency is it work ?

Re: Watch JavaFX SDK Run---On Linux

I haven't tried any specific examples with transparency with the Mac OSX SDK. But with the technology-preview-1 branch, alpha-channel animation does work.

The only thing I noticed that's different is with the animating square example by Joshua Marinacci. When I ran that example, the Window that the animation runs on is white instead of transparent. But that may be the result of my using OpenJDK instead of 6u10.

Re: Watch JavaFX SDK Run---On Linux

yes this is becouse of openJDK with java 1.6 update N it looks awesome !:D

Re: Watch JavaFX SDK Run---On Linux

You can also download the nightly build nbms from hudson, and use those. Window transparency is in 1.6u10.

Re: Watch JavaFX SDK Run---On Linux

6u10 may have transparency, but it doesn't work on Linux for me (Fedora 9, GNOME, Compiz - also tried GNOME's compositor). I hope 1.0 is awesome.

Re: Watch JavaFX SDK Run---On Linux

I get this error when I try to compile: package javafx.ui does not exist What can I do?

Re: Watch JavaFX SDK Run---On Linux

I have tried to install in ubuntu hardy heron 8.10 and the answer of the netbeans is the same maybe there are something wrong with the Searching path of the netbeans

Re: Watch JavaFX SDK Run---On Linux

Your article made me want to give javafx a shot on linux! However, it looks like the zip version is no longer available for download. When I follow your link I get a "Product Not Found" error on Sun's web site. I also cannot find a mac-specific zip download anywhere else through googling. I finally resorted to downloading the dmg file and mounting using instructions from links such as http://ubuntuforums.org/showthread.php?t=125526, but to no avail. It is possible in this case there is an ubuntu-specific bug for moutning hfs+ filesystems, as others have reported bugs such as athttps://bugs.launchpad.net/ubuntu/+source/linux/+bug/144481. I thought I would put this note here so others can avoid the same path of frustration I followed! :)

Re: Watch JavaFX SDK Run---On Linux

Take a look at the updated instructions.

Re: Watch JavaFX SDK Run---On Linux

Hi all,
For JavaFX-1.1.1, NetBeans-6.5.1 on Linux Take a look here :
http://java-javafx-iipt.blogspot.com/2009/03/javafx-111-netbeans-651-on-linux.html
Kaesar ALNIJRES

Add a comment Send a TrackBack