Java 6 and / deployment.config

Java 6 and / 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/ 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 file. So.. here goes.

In short, here’s what I did:

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

In deployment.config you put in these lines:

In you put the settings you want to set – I put this line to disable the security dialogue:

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!!