First, you need to make sure you are using java 1.6. I’m told this method will only work on 64-bit leopard machines, so your mileage may vary. In the finder, browse to /Applications/Utilities and open Java Preferences.app .
Make sure only the Java SE 6 64-bit options are enabled (a word of caution - Flex Builder doesn’t work with these settings - you’ll need to change them back to use it).
You can check your java version by typing java -version in a terminal - you should get the following output.
> java -version
java version "1.6.0_17"Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-9M3125)Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)