Fixing ZDE 5.5 in Snow Leopard

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?)

$ 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

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):

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

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

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

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

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

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

sudo chown -R root:wheel ./1.5.0-leopard

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 Responses to “Fixing ZDE 5.5 in Snow Leopard”

  1. Scott Roach says:

    Anyone else have their Java Preferences.app and ZDE 5.5 crash right away after your try any of this???

  2. 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 :)

  3. Phodetheus says:

    Many thanks for posting this.

    Phodetheus

  4. devmatt says:

    Perfect!

    Thanks for sharing the solution… i was going crazy trying to use Komodo Edit (nothing wrong with it, i’ve just been using ZDE 5.x since 2004)

  5. Chris Southam says:

    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 says:

      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 says:

        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 :)

  6. ChrisN says:

    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.

  7. macx says:

    Brilliant description. Thank you. This works perfectly, till I found a new IDE it fits like 5.5.

  8. Chris Snyder says:

    For those of us missing wget, you can use curl, like:

    curl http://www.cs.washington.edu/homes/isdal/sn~ow_leopard_workaround/java.1.5.0-leopard.tar.gz -o java.1.5.0-leopard.tar.gz

    However, the file seems to have been taken down. It must be available from Apple somehow?

  9. Chris Snyder says:

    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.

  10. TYPO3 says:

    Hallo

    Thanks for the FIX!!

    LG

Twitter

Also: it's Friday? >.<

@dshafik [1 day ago]

OK, who's preordered my iPad for me? :D

@dshafik [1 day ago]

@janinaz I checked out your IMDB, very cool that you got into an episode of Dollhouse :)

@dshafik [1 day ago]

Books & Things