Fixing ZDE 5.5 in Snow Leopard

Standard

If you are still using Zend Studio 5.5, and recently upgrade to Snow Leopard, you will have spotted pretty quickly there is a pretty severe display bug when selecting text.

The reason for this, is that Snow Leopard only ships with Java 1.6 and 1.3 (wtf?)

[sh]
$ ls -al
total 47
drwxr-xr-x 12 root wheel 408 Aug 30 22:08 .
drwxr-xr-x 11 root wheel 374 Aug 29 10:27 ..
lrwxr-xr-x 1 root wheel 5 Aug 29 10:26 1.3 → 1.3.1
drwxr-xr-x 3 root wheel 102 Jul 20 19:35 1.3.1
lrwxr-xr-x 1 root wheel 10 Aug 29 10:26 1.5 → CurrentJDK
lrwxr-xr-x 1 root wheel 10 Aug 29 10:26 1.5.0 → CurrentJDK
lrwxr-xr-x 1 root wheel 5 Aug 29 10:26 1.6 → 1.6.0
drwxr-xr-x 7 root wheel 238 Aug 29 10:26 1.6.0
drwxr-xr-x 8 root wheel 272 Aug 29 10:27 A
lrwxr-xr-x 1 root wheel 1 Aug 29 10:27 Current → A
lrwxr-xr-x 1 root wheel 3 Aug 29 10:26 CurrentJDK → 1.6
[/sh]

As you can see, except for the 1.3 JDK, everything else symlinks to 1.6.0. Now, ZDE will not run with 1.3, and is broken in 1.6, so how do you fix this?

The answer, can be found here: http://wiki.oneswarm.org/index.php/OS_X_10.6_Snow_Leopard

I am replicating it here, as it looks like it’ll be a temporary problem for them and is likely to disappear.

Update (9/13/2009): See this post for details on getting the Java 1.5 binaries from Apple themselves.

It essentially comes down to this: Grab the Java 1.5 JDK from Leopard (original) and then tell OSX to use the 32bit version by default.

This is all done through the Terminal.

So, first, grab the 1.5.0 leopard tarball and unpack (if the link below stops working, contact me for a mirror):

[plain]
cd /tmp/
wget http://www.cs.washington.edu/homes/isdal/snow_leopard_workaround/java.1.5.0-leopard.tar.gz
tar -xvzf java.1.5.0-leopard.tar.gz
[/plain]

Next, move the folder to the standard JVM location on OSX (this will require your user password):

[sh]
sudo mv 1.5.0 /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard
[/sh]

Then remove the current 1.5.0 symlink and point a new one to our new 1.5.0-leopard directory.

[sh]
cd /System/Library/Frameworks/JavaVM.framework/Versions/
sudo rm 1.5.0
sudo ln -s 1.5.0-leopard 1.5.0
[/sh]

Next (and this isn’t in the original document), set permissions:

[sh]
sudo chown -R root:wheel ./1.5.0-leopard
[/sh]

Finally, open up the Java Preferences app in /Applications/Utilities, and in the Java Applications section, drag the “J2S2 5.0 32bit” version to the top.

After doing all this, restart ZDE and the selection bug is gone!

– Davey

13 thoughts on “Fixing ZDE 5.5 in Snow Leopard

  1. IThank you for the great article. I had to move to ZC 7.7 ( although I hate it ) only because of this issue. I have been using ZC 5.5 for years and although continuously researched number of IDEs could’t find anything to be comparable or better for PHP development.

    I love you :)

  2. Chris Southam

    It’s possible I’m being really stupid but I can’t get past line 2 of the first stage.
    In Terminal I get -bash: wget: command not found

    • Davey Shafik

      Apparently some macs don’t have wget. Just download it through Safari with right click > save target file as, then in the Terminal, cd /Users/YOURUSERNAME/Downloads and go from the `tar` command.

      – Davey

      • Chris Southam

        Aaaaaammmmazing!
        I got there in the end – I had a corrupt version of 1.5 somehow. However a restart seemed to complete remove that and that I went through the process again and hey presto!

        Thanks soo much, now I can go back to coding much faster :)

  3. ChrisN

    Brilliant. I was pulling my hair out after the upgrade to Snow Leopard. I’m so pleased I found this page – it worked straight away (although I don’t have wget on my Mac, not sure why). Thanks for posting this.

  4. Update: you can get the files from Apple by following the instructions I posted at http://chxor.chxo.com/post/183013153/installing-java-1-5-on-snow-leopard

    Many thanks for this info, I love ZDE 5.5 and hope it never breaks irreparably. It works in ways that are both different and better than either Komodo or the Eclipse-based Zend Studios. Maybe someday we can convince Zend to release the source code and carry it forward as a community-supported IDE.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>