How does Idea programmatically modify its -Xmx settings?

I just got the new out of memory error in Idea 8.1.3, where it suggests a bigger -Xmx value and offers to set it for you.

This is very cool. I would love to do this in my app. How is Idea pulling this off on OS X?

Idea modifies the Info.plist file, which is protected on my machine with admin permissions. I'm running Idea under a user that does not have admin permissions. How is Idea finding the file location, and how is it getting around the lack of permissions?

In general, Idea is very well behaved on the Mac, much better than most Java apps (including mine) Anytime Jetbrains would like to open source some of their app framework, I think we would all be very appreciative :-)

Please sign in to leave a comment.