This post originated from an RSS feed registered with Java Buzz
by Weiqi Gao.
Original Post: Using JavaFX 1.0 On Linux
Feed Title: Weiqi Gao's Weblog
Feed URL: http://www.weiqigao.com/blog/rss.xml
Feed Description: Sharing My Experience...
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:
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:~/javafx-sdk1.0] $ 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] $ lsbindocs LICENSE.txt README.html servicetag THIRDPARTYLICENSEREADME.txt
COPYRIGHT.html libprofilessamplessrc.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.