JDK-7146890 : Allow passing VM args to launcher from configuration file other than Info.plist
  • Type: Enhancement
  • Component: tools
  • Sub-Component: launcher
  • Affected Version: 7
  • Priority: P4
  • Status: Resolved
  • Resolution: Won't Fix
  • OS: os_x
  • CPU: x86
  • Submitted: 2012-02-18
  • Updated: 2014-03-18
  • Resolved: 2014-03-18
The Java launcher on OS X reads its VM arguments from the Info.plist file.
These are arguments like heap size and system properties.

With OS X 10.8 Apps and therefore Info.plist needs to be signed (for info on this, google "GateKeeper") in order to not be rejected by the OS at installation time.

This makes it impossible to change important configuration arguments after installation without breaking the signature.

Therefore another way to pass those arguments to the VM needs to be found, that can be manipulated, even in a signed app.

It seems that an extra file would do the trick.

Sometimes, while an application runs, you can recognize that the given heap simply isn't big enough. An application that does that is e.g. IntelliJ IDEA. It then allows you to manipulate the settings in Info.plist and to restart with the new settings.

With 10.8 we will all more or less have to sign our apps. If I'm not mistaken, this will also sign the Info.plist file, meaning that a manipulation like IDEA's will be noticed and cause the system to reject the app, because it appears hacked.

Since I'm not aware of any other ways to manipulate max heaps size and friends, it becomes impossible for applications to adjust their memory settings semi-dynamically. This is a problem.

Perhaps the only way out of this dilemma would be to make the launcher read a second file, that is not signed and can therefore be manipulated, which contains all the command line options that we'd like to manipulate for the next app start.