JavaFX SDK on Mac OS X with 32-bit systems (yeah, SoyLatte...)
Maybe not! If you have SoyLatte installed on your computer, you can run JavaFX SDK on it. Just follow these steps:
- Download the SDK for Mac OS X from http://www.javafx.com;
- Open the package and run the installer: you'll see that it refuses to go on without a valid Java 6.
- Open the terminal and go to /usr/bin; make sure that java is a symbolic link to SoyLatte (of course, take note of the existing link in order to restore it later). For instance:
sudo mv java java.old
sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/soylatte16-i386-1.0.2/bin/java
- Now run the JavaFX SDK installer, that will work fine.
By default the SDK gets installed under /System/Library/Frameworks/JavaFX.framework/Versions/Current/ At this point you can try the samples available under /System/Library/Frameworks/JavaFX.framework/Versions/Current/samples: just unpack the sample you like and run ant. You need to set these environment variables:
setenv JAVAFX_HOME /System/Library/Frameworks/JavaFX.framework/Versions/Current/
setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Versions/soylatte16-i386-1.0.2/
At this point you can even use NetBeans with the proper plugins installed. Just make sure you run NetBeans on SoyLatte (you have to configure it on netbeans.conf; remember to add --laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel to netbeans_default_options or it won't start) and create a new custom "JavaFX platform" based on SoyLatte and on the JavaFX SDK you've installed previously. I've not been able to make it the default JavaFX platform, nor to remove the default "JavaFX SDK on Java 1.6 (default)" that will be broken, so you need to manually assign your custom JavaFX platform to all the projects.
You won't be able to see the JavaFX widgets in the editor preview (I've not understood why), but your applications will compile and run fine. I've tried with success all the examples in the JavaFX SDK. Of course, it is not guaranteed that everything will work, but it's better than nothing (and than being forced to buy a new Mac).
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)