Mads Krag Dam - Homepage - MadsD.dk

A part of iSites.dk
Home
Blog
My IT
Husband
Family
Games
Pictures
Contact

Java 6 and deployment.properties / deployment.config


Written by: Mads Dam - 23.04.2010 - 10 comments

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


Comments



MadsD wrote:


31.03.2014 18:32

@Petros
Yes - my solution is machine-wide. The one you're using is user-wide. So unless you have users with specific deployment.properties needs, then I'd personally go the machine-wide-way. That way, it'll apply to any user that logs in to that machine.


Petros wrote:


30.03.2014 16:51

Thank you for your post, I am trying to create or edit my deployment properties when deploying my application via SCCM task sequence. currently, the deployment.properties file in in user profile appdatasunjavadeployment
Will your solution achieve the same goal?


Ladefish wrote:


21.01.2014 21:06

Wow - jackpot...thanks soooo much!

Jane wrote:


31.01.2013 23:57

Philippe- you say use a website with http\:. What if I put my properties file on a Windows server? This worked for version 1.6.xx but not 1.7.11

MadsD wrote:


08.10.2012 15:01 - www.madsd.dk

Hi Chris

ofc you can - by all means - spread the word :)


Chris B wrote:


08.10.2012 15:00 - www.sohoitservices.co.uk

Hi Mads - can I link to your blog on mine?

Great help!!


Stefan wrote:


20.03.2012 05:19

Likewise, this was a huge help with a middle of the night problem.

Thanks for posting.


Konrad Garus wrote:


22.11.2011 11:30 - squirrel.pl/blog

Man, you saved my day. I spent hours and hours looking for the right way to do it.

Philippe wrote:


20.10.2011 15:28

Hi,
you can put the deployment.properties on a web site :
deployment.system.config=http\://somewebsite/java/deployment.properties


Chris wrote:


06.05.2010 13:03

hey! found your page with google. thx a lot for your post, it was a BIG HELP for me!! THX ;)

greets from austria.

chris



Write a comment


Name:
Website: *no http://
Comment: