javac -J-Xms256m -J-Xmx256m Hello.java
javac: invalid flag: -J-Xmx256m Usage: javac
Other switches, such as -J-Xloggc:file.out work fine on OS X.
I've tried passing the switch as '-Xms256m' also, but that also fails. This is a pretty significant bug because without being able to pass -Xms/Xmx values to javac, certain large software builds will fail with an OutOfMemory error.
This is on OS X 10.4.2, with Java 5.
ae86:~ moazam$ java -version
java version "1.5.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-56)
Java HotSpot(TM) Client VM (build 1.5.0_02-36, mixed mode, sharing)
I've filed a bug with Apple, let's see what happens.
Now, here goes the nanny speech, please realize, there are supported flags, and unsupported flags. Just because you see a nice nifty flag -XX:[flag] does not mean you should run off and experiment with it on your production machines! I can't count how many times I've seen people 'tune' their VM by adding options only to have their application performance suffer.
