Migrating to Java 1.6 on a Mac (Warning: Flash CS3/Flex Builder/Eclipse wont work with it)

[Update: Changed the title, added "on a Mac" because everything mentioned here is applicable to that platform alone]

After not looking at it for 4 years, today I started playing with Java again for a new open source project called RedCar, a programmers text editor that is now being ported to SWT and JRuby. Mat is getting pretty involved in it and he got me curious about the project. However to actually get it to work I had to get the Java 1.6 code to compile on my Mac which was a little tricky. Here are some notes from that.

The JDK 1.6 was part of one of the recent Mac Software updates but what I found out was that the update does not actually change the default JDK/JRE for the system. The first thing I did was to change the symlinks for java and javac as mentioned on this post. That seemed to work and calling java – version and javac -version seemed to return the correct versions, but running the build file still did not work. After a few other attempts, including trying the Java Preferences Application without any luck, I finally found this post that basically talked about the CurrentJDK symlink that apparently my build.xml was using (and was still pointed to JDK 1.5). That seems to have worked.

One last thing. Apparently Eclipse (and Flex Builder which is built on top of Eclipse) doesnt work with Java 1.6 on a Mac. As this post suggests, you may have to make a change to the Info.plist for the application to make it run with Java 1.5.

[Update] The Flash CS3 IDE doesnt work with 1.6 as well, so I am reverting back to 1.5 for the time being.

7 Comments so far

  1. [...] Read the original here:  Migrating to Java 1.6 (Warning: Flex Builder/Eclipse wont work … [...]

  2. VELO on September 11th, 2009

    That should be a MAC issue….

    I use eclipse/flexbuilder/flashbuilder on top of java 6 for years.

    Since java 6 was released….

    VELO

  3. arpit on September 11th, 2009

    @VELO as last link in the post above mentions, the bug is because elipse uses 32-bit SWT-Cocoa bindings, and Apple just decided that they weren’t going to support 32-bit SWT any more in Java 6. So yes, its a Mac only thing.

  4. Matt on September 11th, 2009

    Try opening up the FB package and adding -d32 to the jvm arguments. That should get it back in 32-bit mode and you should be OK (we hope). We have tried running FB3 on Snow Leopard which does use Java 6 by default I think it works.

  5. [...] finally I found one comment at the end of the article in this blog which was the easiest and simplest way to solve this [...]

  6. uberVU - social comments on October 26th, 2009

    Social comments and analytics for this post…

    This post was mentioned on Twitter by katopz: RT @tweetmeme Migrating to Java 1.6 (Warning: Flex Builder/Eclipse wont work with it) | code zen http://bit.ly/kQTKd…

  7. [...] AppEngine App issues in Snow Leopard Posted November 27, 2009 Comments(0) I always seem to trip up on these language version issues. I spent way too much time on this so, as usual with such things, [...]

Leave a reply