Java – How to Set Java Runtime for All Users on a Client PC

consolejava

We have a problem with a java application running out of memory. Our (Windows XP) client PCs have JRE 1.6 version 18 installed. I want to increase the -Xmx runtime parameter for the JRE to 512M but I can't seem to set this for all users. When I log in to the PC as Administrator and set the Runtime parameters in the Java Console, these settings only appear for my login.

Best Answer

Maybe you can try modifying a System Deployment Properties file? Short version of usage below:

  1. You need to create a file named deployment.config and put it in either %SystemRoot%\Sun\Java\Deployment or your JRE's \lib\ directory.
  2. The deployment.config contains a pointer to a deployment.properties file, as below:

    deployment.system.config=file\:C\:/Windows/Sun/Java/Deployment/deployment.properties

  3. The deployment.properties file contains the properties that you want to set system-wide, one per line. For my organization, we occasionally have problems with the JRE's caching causing problems, so I disable it with deployment.cache.enabled=false and prevent users from changing the value with deployment.cache.enabled.locked= If you're not sure about the syntax, make the changes for yourself and look at the deployment.properties file normally located in C:\Documents and Settings\<username>\Local Settings\Application Data\Sun\Java\Deployment. At least, I think that's the path in XP. On my Win 7 system it's in AppData\LocalLow\Sun\Java\Deployment.

I don't know if you can set the JRE options like this, but it's worth a shot.