Here’s an error I’ve run into from time to time while programming Flex on OSX
[compc] Error: Java heap space [compc] java.lang.OutOfMemoryError: Java heap space
This error was a real pain in the arse. I found a lot of people having similar issues and they all fixed this problem by setting ANT_OPTS as an environment variable to increase the memory size. This didn’t work for me. I set ANT_OPTS in my .profile, as well as in .MacOSX/environment.plist. No luck. I never figured out why the environment variable route didn’t work, but I was able to fix this error within Eclipse.
If you run into this error while running Ant build scripts, try the following steps.
- Run Menu > External Tools > Open External Tools Dialog…
- Select your Ant build file on the left
- Click the JRE tab on the right
- Enter “-Xmx640m” in the VM arguments field ( without quotes )
- Click Apply, then Run
Hopefully this will get you going.