Using JavaFX 1.0 On Linux
[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.[/]
This is a quick update to my Watch JavaFX SDK Run---On Linux post from 121 days ago.
With the preview release, we got an easy pass because zip file versions of the SDK was available from the download site. For the now online JavaFX 1.0, only the Windows installer and the Mac OS X disk image (*.dmg) versions are available.
Fortunately, Linux can deal with Mac dmg files quite easily. Here's what I tried on my Ubuntu 8.10 amd64 box:
- Download The Mac OS X version of JavaFX SDK 1.0 from JavaFX Downloads for Mac and Windows page
- Run bunzip2 to decompress the downloaded javafx_sdk-1_0-macosx-universal.dmg
- Mount the result at a directory. The directory will contain many levels of subdirectries and files
- Unarchive on of the files with cpio to get a javafx-sdk1.0 directory
Here's a transcript of my terminal session:
[weiqi@gao:~] $ file javafx_sdk-1_0-macosx-universal.dmg javafx_sdk-1_0-macosx-universal.dmg: bzip2 compressed data, block size = 100k [weiqi@gao:~] $ bunzip2 javafx_sdk-1_0-macosx-universal.dmg bunzip2: Can't guess original name for javafx_sdk-1_0-macosx-universal.dmg -- using javafx_sdk-1_0-macosx-universal.dmg.out bunzip2: javafx_sdk-1_0-macosx-universal.dmg: trailing garbage after EOF ignored [weiqi@gao:~] $ mkdir mount-point [weiqi@gao:~] $ sudo mount -o loop -t hfsplus javafx_sdk-1_0-macosx-universal.dmg.out mount-point [sudo] password for weiqi: [weiqi@gao:~] $ mkdir javafx-sdk1.0 [weiqi@gao:~] $ cd javafx-sdk1.0/ [weiqi@gao:~/javafx-sdk1.0] $ gunzip -c ../mount-point/javafx_sdk-1_0.mpkg/Contents/Packages/javafxsdk.pkg/Contents/Archive.pax.gz | cpio -i 65687 blocks [weiqi@gao:~/javafx-sdk1.0] $ ls bin docs LICENSE.txt README.html servicetag THIRDPARTYLICENSEREADME.txt COPYRIGHT.html lib profiles samples src.zip timestamp
A little involved, but we got our javafx-sdk1.0 directory. Copy it to the appropriate place like /opt or wherever you install software packages, add the javafx-sdk1.0/bin directory to your $PATH, and you are in business.
As usual, all the pure Java stuff should work.
I'll let you know what I can do when I play a little bit more with it.
Re: Using JavaFX 1.0 On Linux
Re: Using JavaFX 1.0 On Linux
Unfortunately, JavaFX is not pure Java. The really interesting parts, visual effects and video playback, are native code. And its those parts that are not ready.
You can still do a lot with the pure Java part. The whole language, including animation, is there. The Swing and Java2D based nodes are there.
Re: Using JavaFX 1.0 On Linux
Re: Using JavaFX 1.0 On Linux
If you have copied the javafx-sdk1.0 folder to /opt, then you need to add something like the following to your .bashrc file and relogin:
export PATH=$PATH:/opt/javafx-sdk1.0/bin
That will allow you to run javafxc, javafx, javafxdoc, javafxpackager from the command line.
Re: Using JavaFX 1.0 On Linux
file netbeans-6.5-javafx-macosx.dmg
netbeans-6.5-javafx-macosx.dmg: VAX COFF executable not stripped
My bzip2 is "Version 1.0.3, 15-Feb-2005", I'm on CentOS:
uname -sro
Linux 2.6.18-92.1.22.el5xen GNU/Linux
Am I hosed? My system is up2date and I'm not finding another bzip anywhere :( If this were to work, I would echo Daad's comment - nice trick!
Re: Using JavaFX 1.0 On Linux
Re: Using JavaFX 1.0 On Linux
sudo mount -o loop -t hfsplus javafx_sdk-1_1-macosx-universal.dmg.out mount-point
[sudo] password for mao:
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
help please! tnx
Re: Using JavaFX 1.1 On Linux
I've installed JavaFX SDK 1.1 on Linux using a .nbm file from NetBean.org
1-http://updates.netbeans.org/netbeans/updates/6.5/uc/final/stable/patch2/javafx2/
2-Download "org-netbeans-modules-javafx-sdk-mac.nbm"
3-$ unzip org-netbeans-modules-javafx-sdk-mac.nbm
4-Among the decompressed directories a directory called "netbeans" inside this a directory called "javafx-sdk". This directory is the SDK
5-$ chmod u+x javafx-sdk/bin/*
6-Add javafx-sdk/bin to your PATH
7-Enjoy :)
8-http://java-javafx-iipt.blogspot.com/2009/02/installer-javafx-11-sdk-sur-linux.html