Java…bane of network admins everywhere, and quite possibly the largest security risk ever unleased on the Internet. Yet as much as best-practices say just don’t install Java, the reality is many websites and applications require it, and in working with Java you may find the need to change certain settings. Unfortunately these settings are stored in a configuration file rather than in the Windows registry, so changes cannot be made through Group Policy. And just to add another layer of complexity the config file is per-user and stored in the user’s profile.
To deal with this I’ve developed a short vbScript that can make changes or additions to the Java config file, deployment.properties, which normally resides in c:\users\UserName\AppData\LocalLow\Sun\Java\Deployment.
The script is reasonably well commented, so I’m not going to spend much time on it here though there are a couple things to note.
Any settings you want to add/change need to be included in the lines below. These should be the only changes you need to make in the script to suit your needs, then run it as a login script so every user gets the desired settings.
dictParams.Add “property”, Array(“deployment.expiration.check.enabled”, “deployment.cache.enable” ) ‘ Add any additional parameters here
dictParams.Add “value”, Array(“false” , “true” ) ‘ Add the value for each parameter here
I’ve tested this on Windows 7 and Windows 8.1 though it should work on 2000 or newer.
As always, use this at your own risk. The script doesn’t do too much that could cause trouble and it creates a backup of the deployment.properties file in case something strange happens, but test things out nonetheless before using in production.
Update 3-24-14: I ran into a single instance where this script continued to run, generating a 42GB file before we determined the problem. It appears this was a random race condition between our A/V software and the script, but in an effort to prevent a reoccurrence, I’ve added a MAXLINES parameter, after which the script should quit regardless of anything else going on.
Get the script from here. (Updated 3-24-14)
Pingback: Revisiting Java Configuration | Trials of a Network Admin