History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-13443
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Eugene Zhuravlev
Reporter: Maxim Drobintsev
Votes: 2
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

IDEA does not handle compiler flag "-J" correctly

Created: 30 Nov 06 03:35   Updated: 21 May 07 20:13
Component/s: Compiling Project
Fix Version/s: Selena 6981

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment:
Linux x86 32 bit
Sun JDK 1.5.0_06

Build: 6,112
Fixed in build: 6,964


 Description  « Hide
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

-J-Xss5k

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:

-J -Xss5k

, 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.



 All   Comments   Work Log   Change History      Sort Order:
Eugene Zhuravlev - 19 Jan 07 18:26
Actually, -J{something} is a way to communicate to javac launcher (javac.exe on Windows, for example), not javac itself.
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.

Eugene Zhuravlev - 19 Jan 07 18:33
Reopen reason: On the other hand, we could parse such "-J" stuff and add these jvm options to the command line of the VM that is used to start javac

Keith Lea - 17 May 07 22:38
This is blocking some teams here from moving to Java 6 because we can't build without passing -Xss. Are there any workarounds (even at plugin API level)?

Eugene Zhuravlev - 18 May 07 18:25
As a workaround:
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".

Keith Lea - 18 May 07 20:11
Thanks Eugene I really appreciate the prompt fix and response. I'll let you know how the workaround goes.

Keith Lea - 19 May 07 00:07
Eugene, we don't have an automated way to make this change for all of our engineers. Is there any chance this could be backported to 6.x, or at least Selena M1 branch?

Eugene Zhuravlev - 19 May 07 12:04
No problem to backport, though I'm not sure about 6.x release in the nearest future.... So if M1 branch is ok for you, I'll commit changes there.

Keith Lea - 21 May 07 20:13
Sure, M1 works for now.