/bundles/itninjaweb/img/Breadcrumb_cap_w.png
Is there anyway to automate disabling certain versions of JRE in the Java control panel application?  i have a situation were i need to install multiple versions of Java but only need one JRE setting enabled, thanks.

KwaXP3.png



2 Comments   [ - ] Hide Comments

Comments

  • i tried what you suggested and it didnt work, i also used a transform mst to point the deployment.properties file to c:\windows\sun\deployment. Any other suggestions?

    Thanks
    • Can you post the steps as how you did? I tried in my lab before posting and it works like charm.
  • Sure. Im using java 7 update 71.

    My CMD file

    Creates folder structure "C:\WINDOWS\Sun\Java\Deployment"
    Copies deployment.config and deployment.properties files to that directory

    install the MSI with a transform file

    My Transform file
    added this info to properties field
    deployment.properties C:\Windows\Sun\Java\Deployment\deployment.properties
    deployment.user.security.exception.sites C:\Windows\Sun\Java\Deployment\exception.sites

    My deployment.config file
    deployment.system.config=file\:C\:/Windows/Sun/Java/Deployment/deployment.properties


    deployment.properties file
    #deployment.properties
    #Thu Nov 05 13:24:37 EST 2015
    deployment.modified.timestamp=1446747877874
    #Java Deployment jre's
    #Thu Nov 05 13:24:37 EST 2015
    deployment.javaws.jre.1.location=http\://java.sun.com/products/autodl/j2se
    deployment.javaws.jre.0.args=
    deployment.javaws.jre.0.registered=true
    deployment.javaws.jre.2.enabled=false
    deployment.javaws.jre.1.args=
    deployment.javaws.jre.1.enabled=false
    deployment.javaws.jre.2.args=
    deployment.javaws.jre.2.platform=1.5
    deployment.javaws.jre.1.registered=true
    deployment.javaws.jre.2.osname=Windows
    deployment.javaws.jre.2.osarch=x86
    deployment.javaws.jre.0.osarch=x86
    deployment.javaws.jre.0.osname=Windows
    deployment.javaws.jre.2.location=http\://java.sun.com/products/autodl/j2se
    deployment.javaws.jre.1.product=1.6.0_31
    deployment.javaws.jre.2.registered=true
    deployment.javaws.jre.0.platform=1.7
    deployment.javaws.jre.0.path=C\:\\Program Files\\Java\\jre7\\bin\\javaw.exe
    deployment.javaws.jre.0.location=http\://java.sun.com/products/autodl/j2se
    deployment.javaws.jre.1.path=C\:\\Program Files\\Java\\jre6\\bin\\javaw.exe
    deployment.javaws.jre.0.enabled=true
    deployment.javaws.jre.2.path=C\:\\Program Files\\Java\\jre1.5.0_14\\bin\\javaw.exe
    deployment.javaws.jre.1.osarch=x86
    deployment.javaws.jre.1.osname=Windows
    deployment.javaws.jre.2.product=1.5.0_14
    deployment.javaws.jre.1.platform=1.6
    deployment.javaws.jre.0.product=1.7.0_71


    **if i manually copy the deployment.propeties file to "C:\Users\USER\AppData\LocalLow\Sun\Java\Deployment" the configuration works.
Please log in to comment

Community Chosen Answer


Answers

1

You can edit the C:/Users/Admin/AppData/LocalLow/Sun/Java/Deployment/deployment.properties file.

Search for something like this inside the deployment.properties file.

deployment.javaws.jre.1.path=C\:\\Program Files\\Java\\jre6\\bin\\javaw.exe
deployment.javaws.jre.1.platform=1.6

deployment.javaws.jre.1.enabled=True

deployment.javaws.jre.2.path=C\:\\Program Files\\Java\\jre7\\bin\\javaw.exe
deployment.javaws.jre.2.platform=1.7

deployment.javaws.jre.2.enabled=True

Change the value for deployment.javaws.jre.2.enabled to false for the JRE versions which you want to turn off.

NOTE: Numberings will differ in your case. I just gave an example.

Also place the deployment.properties file in C:\Windows\Sun\Deployment  so that it will reflect for all the users.


Answered 11/04/2015 by: apptopack
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity

Answers

0
Search for deployment.properties for java and you can understand how to modify settings and replicate it for all users.
Answered 11/07/2015 by: apptopack
Red Belt

Please log in to comment
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share