Project
IntelliJ IDEA
Priority
Normal
Type
Feature
Fix versions
No Fix versions
State
Fixed
Assignee
Eugene Zhuravlev
Subsystem
Compiling Project
Affected versions
No Affected versions
Fixed in build
108.65  
  • Created by   Maxim Drobintsev
    5 years ago (30 Nov 2006 04:35)
  • Updated by   root
    2 years ago (17 Jan 2010 20:38)
  • Jira: IDEADEV-13443
    (history, comments)
 
IDEA-35703 IDEA does not handle compiler flag "-J" correctly
2
Issue is visible to: All Users
  The issue is visible to the selected user group only
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.

Environment: Linux x86 32 bit
Sun JDK 1.5.0_06

Issue was resolved
Comments (8)
 
History
 
Linked Issues (?)
 
Eugene Zhuravlev
  Eugene Zhuravlev
19 Jan 2007 19:26
5 years ago
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
  Eugene Zhuravlev
19 Jan 2007 19:33
5 years ago
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
  Keith Lea
17 May 2007 23:38
4 years ago
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
  Eugene Zhuravlev
18 May 2007 19:25
4 years ago
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
  Keith Lea
18 May 2007 21:11
4 years ago
Thanks Eugene I really appreciate the prompt fix and response. I'll let you know how the workaround goes.
Keith Lea
  Keith Lea
19 May 2007 01:07
4 years ago
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
  Eugene Zhuravlev
19 May 2007 13:04
4 years ago
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
  Keith Lea
21 May 2007 21:13
4 years ago
Sure, M1 works for now.