Deploy Java deployment.config

As I said in my previous post, you can create a fairly simple batch file to copy the Java deployment.config file out to all of the PC’s on your network/domain. Prior to the deployment.config file copy you must create the directory structure shown below.

C:\windows\sun\java\deployment

This directory does not exist by default, but Java will check to see if there is a C:\windows\sun\java\deployment\ directory and use the deployment.config file located there if it exists to reference the deployment.properties file location.  If not Java will use the default directory of C:\Users\UserName\Appdata\LocalLow\Sun\Java\Deployment\ for the deployment.properties file.

The Batch File

Create a batch file with the two lines below and save it to use in your SCCM package. If your not interested in managing your deployment.properties file from a single location, you could simply copy your deployment.properties file to the C:\windows\Sun\Java\Deployment directory.

if not exist “c:\windows\Sun\Java\Deployment” md “c:\windows\Sun\Java\Deployment”
copy “%~dp0deployment.config” “c:\windows\Sun\Java\Deployment” /y

Either way you can get the file copied by creating batch file and deploying a package with SCCM 2007 or 2012.

 Simple deployment.config File Example

deployment.system.config=http\://www.mydomain.com/java/deployment.properties
deployment.system.config.mandatory=false

Simple deployment.properties File Example

deployment.expiration.check.enabled=false

Make sure the deployment.properties file is uploaded to the location referenced in the deployment.system.config. Put the deployment.config file in the same directory that you are running your batch file from and create the package in SCCM. The batch file will create the directory and copy the deployment.config file to the directory specified.

Sponsors