IDEA does not allow me to specify javac command line parameter "-J". This parameter is used for passing flags directly to the runtime system.
If I specify
in the "Additional command line parameters" text box then I get the following error during compilation:
Error:javac: invalid flag: -J-Xss5k
Expected result:
bin$ ./javac -J-Xss5k
The stack size specified is too small, Specify at least 48k
Could not create the Java virtual machine.
IDEA does allow to specify "-J" flag with a space:
, but it has no visible effect on the compiler (the error "The stack size specified is too small, Specify at least 48k..." does not happen).
Thanks,
Maxim.
Environment: Linux x86 32 bit
Sun JDK 1.5.0_06
Issue was resolved
IDEA does not use launcher to start javac, it starts the compiler directly via the "main" method, so the "-J..." syntax is not recognized, because javac does not have such option. As for the additional javac parameters, there is a special text field on compiler settings page.
Try to substitute java executable in jdk installation with the script that calls "real" java executable with the -Xss option. This should work at least on unix systems where you can create an executable file named "java".