Fabrizio Giudici is a Senior Java Architect with a long Java experience in the industrial field. He runs Tidalwave, his own consultancy company, and has contributed to Java success stories in a number of fields, including Formula One. Fabrizio often appears as a speaker at international Java conferences such as JavaOne and Devoxx and is member of JUG Milano and the NetBeans Dream Team. Fabrizio is a DZone MVB and is not an employee of DZone and has posted 67 posts at DZone. You can read more from them at their website. View Full User Profile

JavaFX SDK on Mac OS X with 32-bit systems (yeah, SoyLatte...)

  • submit to reddit
As you know, the JavaFX SDK has been released a week ago for Windows and Mac OS X running on a 64-bit processor. The reason for the latter requirement is that JavaFX needs Java 6 and Apple's Java 6 is only available for 64-bit processors. So? What if you own, like me, a MacBook Pro Core Duo from the 32-bit generation? Need to switch to Windows or Linux? Btw, be aware that while Sun hasn't released an official Linux SDK, Weiqi Gao explained how to tweak the JavaFX SDK for Mac OS X to run under Linux.

Maybe not! If you have SoyLatte installed on your computer, you can run JavaFX SDK on it. Just follow these steps:

  1. Download the SDK for Mac OS X from http://www.javafx.com;
  2. Open the package and run the installer: you'll see that it refuses to go on without a valid Java 6.
  3. 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:
    cd /usr/bin/
    sudo mv java java.old
    sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/soylatte16-i386-1.0.2/bin/java
  4. 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).


X11ScreenSnapz003.jpg106.26 KB
Published at DZone with permission of Fabrizio Giudici, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)


walter chang replied on Fri, 2008/08/08 - 3:51am

well done!  fyi, preview does not work on 64-bit mac either.

John Denver replied on Fri, 2008/08/08 - 5:00am

Awesome done!!, SoyLatte Rocks!, I have JavaFX preview and works on 64bit the problem is with the browsers all the broweser for Mac still 32bit.


PS. We need really to support Mr.Landon work(SoyLatte) some how with contributions or donation, anything.

Fabrizio Giudici replied on Fri, 2008/08/08 - 5:09am

Yes, the browser thing is really severe, but in this case I've still some hope in Apple that they will fix it in a few months, when the final JavaFX SDK is available and people will start deploying stuff.

PS The browser problem is only with Safari or also with FireFox?

John Denver replied on Fri, 2008/08/08 - 9:48pm in response to: Fabrizio Giudici

Firefox 3 also have the problem, it is the Apple plugin system so all the broweser deosnt play well with JavaFX right now.



Jose Jeria replied on Sat, 2008/08/09 - 2:37am

So, will you have above instructions visible on top of your web page for all users that needs this?

Seriously, this is one of the reasons why JavaFX can't compete with Flash. 

Fabrizio Giudici replied on Sat, 2008/08/09 - 8:44am

Of course, yes, JavaFX can't be deployed on Mac OS X systems older than one year and it's a limit. Fortunately, Mac OS X systems are a small percentage of the installed clients. If SoyLatte is improved, removing the current annoyances, it will be possible to overcome that limit and run also on 32-bit and PPC systems.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.