<< Google Chrome: The Three Month Report | Home | Wednesday Java Quiz >>

JavaFX 1.0 On Linux: Video

[Update (Wed Jun 3 07:45:43 PDT 2009)]: As of June 2, 2009, you can download the Linux and Solaris version of JavaFX 1.2 SDK directly from http://javafx.com. The Linux and Solaris support is preview only.[/]

In the two previous posts, I showed how to install JavaFX SDK 1.0 and the JavaFX 1.0 NetBeans Plugin on Linux machines. In both cases, I used the Mac version of the JavaFX SDK.

This approach won't give us any native libraries for Linux. However, thanks to http://twitter.com/lqd (via Pushing Pixels), we know a place where we can get those:

If you look carefully, you may find jar files whose names contain "natives". Although not complete, the various Linux and Solaris platforms are represented. Download, unjar, and throw the resulting *.so files into the appropriate place, you've gotten at least some of the native capabilities. The most interesting of them all is

jmc-natives-linux-i586__V1.0.0.jar

which contains

libGStreamer.so
libon2_decoder.so

That could only mean one thing—JavaFX videos on Linux. Here it is (Linuxy format, you need extra software to view it on Windows and Mac):

JavaFX Video on Linux

This is an Ogg Theora video recorded with gtk-recordMydesktop in Fedora 10/i586 with OpenJDK 6 (in VirtualBox 2.0.6 in Vista SP1, on the other side of the dual-boot). It is also the video played by JavaFX inside the video. I wasn't able to play FLV videos when I tried. Well, they did say it's not ready.



Re: JavaFX 1.0 On Linux: Video

Unfortunately it seems that the download file is not longer there and Sun has removed it, I was not able to find any alternative places either...

Re: JavaFX 1.0 On Linux: Video

You can still get at them through the following steps:

i) Run a sample program, say, the EffectsWorkBench from javafx.com. Wait for it to download the JavaFX runtime.
ii) Look for *.so files in your JNLP cache directory:

[weiqi@gao] $ cd ~/.java/deployment/cache
[weiqi@gao] $ find . -name "*.so"
./6.0/33/4a8f17e1-324491b5-n/libjogl_cg.so
./6.0/33/4a8f17e1-324491b5-n/libjogl.so
./6.0/33/4a8f17e1-324491b5-n/libjogl_awt.so
./6.0/20/49ba6a14-44374338-n/libGStreamer.so
./6.0/20/49ba6a14-44374338-n/libon2_decoder.so
./6.0/7/38b33447-44cdf0aa-n/libgluegen-rt.so
iii) Copy them into your javafx-sdk1.0/lib/desktop directory, and you are in business.

If you are on 64-bit Linux, the *.so files you get will match the architecture (32-bit or 64-bit) of the javaws program that is used to run the sample program. You need to use the 64-bit OpenJDK's javaws to get the 64-bit *.so files. You need to use the javaws in ia32-sun-java6-bin to get the 32-bit *.so files.

Re: JavaFX 1.0 On Linux: Video

that's great! Thanks to your help I got now a JFX setup under Eclipse and Ubuntu 8.10 up and running. Many thanks again!

Re: JavaFX 1.0 On Linux: Video

libon2_decoder and libgstreamer don't get downloaded anymore and any example involving video doesn't work on my JDK6/64-bit Ubuntu 8.10 system.

libgstreamer can be found with apt-get install libgstreamer0.10-0 (but I don't know if it's the right one) but is there a way to get libon2_decoder?

Thanks


Add a comment Send a TrackBack