/build/static/layout/Breadcrumb_cap_w.png

What's the use of the deployment.properties file when you install Java?

I've tried to find information on this for a while now and I can't seem to find what I need. The deployment.properties in your C:\Users\%user%AppData\LocalLow\Sun\Java\Deployment\ folder seem to contain all the different version of Java that is currently installed or was installed. What's the use of this file? I'm replacing someone that left in my team and he was pushing that file before and after the installation... but it seems empty.. nothing but the current version in the file. #deployment.properties #Thu Apr 27 10:19:36 EDT 2017 deployment.modified.timestamp=1493302776750 deployment.roaming.profile=false deployment.security.mixcode=HIDE_RUN deployment.version=8 deployment.expiration.check.enabled=false deployment.javaws.associations=ALWAYS deployment.browser.path=C\:\\Program Files\\Internet Explorer\\iexplore.exe #Java Deployment jre's #Thu Apr 27 10:19:36 EDT 2017 deployment.javaws.jre.0.product=1.8.0_131 deployment.javaws.jre.0.path=C\:\\Program Files\\Java\\jre1.8.0_131\\bin\\javaw.exe deployment.javaws.jre.0.args= deployment.javaws.jre.0.platform=1.8 deployment.javaws.jre.0.osarch=x86 deployment.javaws.jre.0.osname=Windows deployment.javaws.jre.0.registered=true deployment.javaws.jre.0.enabled=true deployment.javaws.jre.0.location=http\://java.sun.com/products/autodl/j2se can anyone help? Thanks

0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: mantexau 7 years ago
Blue Belt
1

Top Answer

There is plenty of information regarding all the different options for deploying Java out there, I used to find myself very confused by it all too, as I wasn't sure which one to follow, I ended up compiling my own deployment package by following the guides found on the Java docs @ oracle.com, some links provided at the end of my comment.


The deployment.properties file is used to store and retrieve deployment configuration properties that can be seen in the Java Control Panel.  It can also be used for customizing the runtime behavior for the Java Plug-in and Java Web Start.

The location which you are referring to (C:\Users\%user%AppData\LocalLow\Sun\Java\Deployment\)  is used for a User-level configuration, and I believe this is non-configurable.

What I believe you need to look at is at the "System-level" configuration.  For this, you first need to configure another file called "deployment.config", inside this file you can define the location of the system-level deployment.properties file.

This is what my current Java deployment configuration looks like, I have been using this for over a year now and have had to make very minor changes:

1. Create a folder called "config" and inside create 3 differente files:

  • deployment.config - The contents of this file:
deployment.system.config.mandatory=true
deployment.system.config=file:///C:/WINDOWS/Sun/Java/Deployment/deployment.properties
  • deployment.properties - The contents of this file
# System Deployment Properties
# Created by David Zapata
# Updated on 28 November 2016
# Disable Sponsor offers like ASK Toolbar
install.disable.sponsor.offers=true
install.disable.sponsor.offers.locked
# Mixed code (sandbox vs. trusted) security verification
deployment.security.mixcode=HIDE_RUN
# Security Level
deployment.security.level=HIGH
# Security Execution Environment\Enable granting elevated access to signed apps
# aka. Allow user to grant permissions to signed content
deployment.security.askgrantdialog.show=true
# Enable Java content in the browser
deployment.webjava.enabled=true
# JNLP File/MIME Association
deployment.javaws.associations=0
deployment.javaws.autodownload=NEVER
deployment.javaws.autodownload.locked
# Shortcut Creation
deployment.javaws.shortcut=NEVER
# Prompt: Your Java version is insecure. or Your Java version is out of date
deployment.expiration.check.enabled=false
deployment.expiration.check.enabled.locked
# Exception sites file location
deployment.user.security.exception.sites=C:\\WINDOWS\\Sun\\Java\\Deployment\\exception.sites
# Java Console - Options for show, disable or hide the Java Console
deployment.console.startup.mode=HIDE
  • exception.sites - You can add application URLS in this file to allow your users to Java enabled sites that would normally be blocked by security checks.  Note that once you use this file, sites can no longer be added in the Java Control Panel, this gives you more control as you can manage this exclusively through the exception.sites file.


This is what my Config folder looks like:

Ib6qhE.png


2. Create another folder, you can call it Jre1.80_xx (I use whatever version of Java I'm deploying to keep some standard and also make it easy to identify.  Inside this folder, place the config folder as well as the latest java exe available (at time of writing it is jre-8u131-windows-i586.exe).  You are also going to create two more files inside this folder:

  • java.settings.cfg - The contents of this file can vary, depending on your deployment needs, this are my settings:
INSTALL_SILENT=1
STATIC=0
AUTO_UPDATE=0
WEB_JAVA=Enable
WEB_JAVA_SECURITY_LEVEL=H
WEB_ANALYTICS=0
EULA=0
REBOOT=0
NOSTARTMENU=1
SPONSORS=0
REMOVEOUTOFDATEJRES=1


  • install.bat - This is your install script pulling everything together

@echo off
setlocal enableextensions
@cd /d "%~dp0"


REM The below command will look for and uninstall any previous Java 7 or 8 from the target machine
wmic product where "name like 'Java 7%%' or name like 'Java 8%%'" call uninstall /nointeractive


REM The first command will copy the Java configuration file to the target machine
xcopy java.settings.cfg "C:\ProgramData\Oracle\Java\" /I /Q /R /Y > nul


REM The following line will install the java software to the target computer
Start /wait jre-8u131-windows-i586.exe /L C:\Drivers\jre-8u131.log


REM The next line will copy the Java deployment property files to the target computer
xcopy Config\*.* "C:\Windows\Sun\Java\Deployment\" /I /Q /R /Y > nul


endlocal

NOTE: The way I use my batch script allows me to either deploy my software package from the K1000 by calling install.bat, or I can do a manual install on the target computer by simply right clicking on the batch file and run as admin, as long as all the contents stay inside the same folder the installation will work.  I use this for all my software packaging actually, helps me to easily do manual installs on target machines where the agent may not be installed, or when users download the software package from the user portal, I instruct them to install the software by right clickin on the install.bat file.


This is what my software package looks like before I zip it and upload to my KBOX

5V5ra8.png

Again, this has worked really well for me for about a year now and have had to make very little changes, you may need to make some customizations of your own, but I believe this should at least give you a guide.


More info regarding the deployment.properties file

https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/properties.html

More info regarding the Java configuration file

https://docs.oracle.com/javase/8/docs/technotes/guides/install/config.html

Hope it helps.


Comments:
  • Pretty much followed this template for our most recent Java 8 Update 144 SCCM deployment. Has worked very well, so thanks for this post. - Vialli 7 years ago
    • We do not have folder name C:\Windows\Sun\Java\Deployment. have you make this folder? next question is about content of deployment.properties file, can we copy user based deployment.properties file and add only following line deployment.user.security.exception.sites - Faisal79 5 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ