The Breaker said on Thu Feb 14 14:38:57 +0000 2008 | permalink
Tagged: spaces netbeans leopard osx java fixes hacks protools

Get Spaces and Netbeans working together

So Netbeans released 6.0.1 and Apple released Leopard 10.5.2 update yesterday. Good news yes? Unfortunately Apple’s Spaces still is not going to recognize Netbeans or apparently a number of Java5 apps.

After a bit of googling, it seems the fix is involved with a missing key in Netbeans’ Info.plist file that Spaces looks for in order to identify available applications. Time to change it.

First thing is getting permissions changed so you can edit.

sudo chmod 774 ~/../../Applications/NetBeans/NetBeans\ 6.0.1.app/Contents/
sudo chmod 774 ~/../../Applications/NetBeans/NetBeans\ 6.0.1.app/Contents/Info.plist

Now vim (or whatever editor-name-as-action-verb you want to use) Info.plist and add these lines.

  
<key>CFBundleIdentifier</key>
<string>org.netbeans</string>

Mac also has a Property List Editor that handles tags for you. Show package contents from the Netbeans icon and open Contents > Info.plist, select Root and click “add child.” Once you have done that, just type in the key and string in the fields provided.

Alright, now you can go to spaces and add Netbeans. Instead of the Netbeans icon you will see “Unknown Application” in the Spaces window. Fun. You can Check Info.plist again if you want; the CFBundleIconFile key is there and calling netbeans.icns for you. even better, Netbeans still only works properly part of the time. wtfdwts?

I noticed when i ran the Leopard 10.5.2 update and before i installed Netbeans 6.0.1, I saw the Netbeans icon in Spaces and things worked properly. 6.0.1 got installed… broken again. so I did the Info.plist fix again and we’re back to the “Unknown application.” I moved the whole netbeans folder out of applications and deleted its association in Spaces, then moved it back and it all worked.

Too much buck for too little bang? Maybe. For me, it was enough of an annoyance to fix. Oh and if you want to be able to reliably ⌘-tab to a java app that is in another space, it can be done as well. Open up a second window in the app and it will work for some reason that I don’t claim to understand.

My ⌘-tab solution in Netbeans is to keep the find/replace dialoog box open. Because i have that up most of the time anyway and it counts as a second window, it is a fix( read: hack ) I can live with.

Ok well hopefully Apple can get this thing solved by the time I need to upgrade my Macbook Pro to Leopard. I suppose that could be a little while since I cant upgrade that one to Leopard until ProTools LE can run on it. The HD version only supports 10.5.1 and that was just announced yesterday. This begs the question – Why am I running Digidesign products on a Mac anyway? Time to get Logic Studio I think.