Java 6 and deployment.properties / deployment.config

Java 6 and deployment.properties / deployment.config

Posted by on 23. J 2010 in Blog

So, ever wanted to deploy Java-settings centrally? Or via an image?

There are a lot of sites on the net, trying to explain how to use Suns/Oracles own deployment.config/deployment.properties system to set these central settings. But I have always had a problem finding actual working examples. I hope my post here can help.

Personally with Java 6 Update 19 (and now 20), I started seeing people complain about the security dialogue about untrusted/external code and do I want to run it (yes or no), with no “remember me”-button. Well, basically I agree with the decision to force users to click either yes or no every time, cause again this forces us programmers to actually write better code and not take too many shortcuts. However, as an enterprise administrator I also see the annoyance to users this dialogue box present.

Since Sun/Oracle don’t provide registry-settings we Windows-administrators can set (naturally because Java is platform neutral), we can basically only use the deployment.properties file. So.. here goes.

In short, here’s what I did:

  • Created %WinDir%\Sun\Java\Deployment-folders
  • Created a deployment.config file
  • Created a deployment.properties file

In deployment.config you put in these lines:
deployment.system.config=file\:C\:/WINDOWS/Sun/Java/Deployment/deployment.properties
deployment.system.config.mandatory=false

In deployment.properties you put the settings you want to set – I put this line to disable the security dialogue:
deployment.security.mixcode=DISABLE

This directory structure can be put into my image so I can deploy it automatically to new machines. But I suspect that you could also place it on a fileshare or website or whatever. Loginscripts are also a happy place to put them 🙂 Choices choices!!