UPDATE 2:
The retail version of IntelliJ Idea 9 uses the JDK6 32bit by default on Snow Leopard (in contrast with the betas which were using JDK6 64bit).
The article has been updated to reflect this.
The retail version of IntelliJ Idea 9 uses the JDK6 32bit by default on Snow Leopard (in contrast with the betas which were using JDK6 64bit).
The article has been updated to reflect this.
IntelliJ Idea 9.0 - Mac OSX 10.6 Snow Leopard
The default installation of IntelliJ IDEA 9.0 uses JDK6 32bit on Mac OSX 10.6 "Snow Leopard". With a little configuration we can force it to use the 64 bit JDK6, which is also part of the operating system.After you installed IntelliJ IDEA, Cmd+click on the IDEA launcher-icon to open it in Finder. Ctrl-click on the IntelliJ IDEA icon and choose Show Package Contents. Select Contents and right-click Info.plist. Select Open with -> TextEdit. This brings up the file in the text editor.
Do a search (CMD+f) on the string JVMArchs. You'll find the following entry:
<key>JVMArchs</key> <array> <string>i386</string> <string>x86_64</string> <string>ppc</string> </array>
Put the x86_64 entry on top (e.g. swap the i386 and the x86_64 lines), save the file (CMD+s) and close TextEdit (CMD+q). If you restart Idea, you'll see it is using the 64bit JDK if you check it in the IntelliJ Idea->About.
You can also check if a given process is 64bit in Applications->Utilities->Activity Monitor. Check out the last column called Kind.
IntelliJ Idea 8.0, 9.0 - Mac OSX 10.5 Leopard
In contrast, Idea uses JDK5 on MacOS X 10.5 "Leopard", and that's 32bit only. Again just a little configuration and we can force it to use the 64bit JDK6.After you installed IntelliJ IDEA, CMD+click on the IDEA launcher-icon which brings up the entry in Finder, now right-click (or ctrl-click) on the IntelliJ IDEA icon and choose Show Package Contents. Select Contents and right-click Info.plist. Select Open with -> TextEdit. This brings up the file in the text editor.
Do a search (CMD+f) on the string JVMVersion. You'll find the following entry:
<key>JVMVersion</key> <string>1.5*</string>Change the 1.5* to 1.6*, save the file (CMD+s) and close TextEdit (CMD+q). Since the JDK6 in Leopard is 64-bit only, we don't have to touch the JVMArchs section.
Start IDEA and check in About IntelliJ IDEA if it is indeed using the 64bit JDK6.
IntelliJ Idea 8, 9 betas: if IntelliJ does not start anymore, and honors us with a [JavaAppLauncher Error] unable to find a version of Java to launch in the log file, we have to replace the launcher with a 64bit executable. Open a terminal:
Replace Maia-IU-90.94 with the proper name of your application - I was using a developer preview of IntelliJ IDEA 9, but this same method works for version 8 as well.
cp /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub64 /Applications/Maia-IU-90.94.app/Contents/MacOS/idea
Replace Maia-IU-90.94 with the proper name of your application - I was using a developer preview of IntelliJ IDEA 9, but this same method works for version 8 as well.
32bit or 64bit?
To me IntelliJ Idea seems more responsive on 64bit JDKs. I'm wondering if you consider it faster as well? If you are developing for JDK6 on Leopard you should use similar amount of memory now (the 64-bit JDK footprint is bigger but there's only one copy of the JDK in memory), and - as a question of personal taste - the display looks nicer since JDK6 uses the native font smoothing style of OSX (a mixture of regular antialiasing and subpixel rendering), whilst JDK5 uses plain anti-aliasing without subpixel rendering. There are some comments online about memory leaks using JDK6, but personally I didn't experience this.Happy developing using this great tool!