Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java settings via registry in windows client

Tags:

java

registry

Does anyone know how to set the JRE values from the below dialog via a registry key ? nothing obvious in HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment (or where the heck these values are stored ?)

We have to set the command line memory allocation for our users and they have difficulty typing the arguments, hitting return and the clicking OK.

I was figuring just create a SetCmdArgs.rgs file and have them use regedit to set the values.

from "C:\Program Files\Java\jre6\bin\javacpl.exe" on XP from "C:\Program Files (x86)\Java\jre6\bin\javacpl.exe" on Win7 alt text

Thanks, Craig

like image 444
Craig Avatar asked Jan 07 '11 23:01

Craig


People also ask

How do I find my Java settings?

Right-click on the Start button and select the Control Panel option. In the Windows Control Panel, click on Programs. Click on the Java icon to open the Java Control Panel.

How do I configure Java settings?

Change to the appropriate directory. Type control-panel to open the control panel. Click the Java Settings link under the Runtime Options menu on the left side of the Control Panel window.

How do I set Java security settings for all users?

We do this by going to Control Panel> Programs > Java > Security tab and Edit the sites list. Not really a big deal, but the setting only apply to the current user and with multiple users on the domain logging into single PCs it has become quite the head ache.

How do I open Java security settings?

Setting the Security levels through the Java Control PanelIn the Java Control Panel, click on the Security tab. Select the desired Security level. Click Apply. Click OK to save changes made to the Java Control Panel.


1 Answers

It seems to be the file C:\Users\%USER%\AppData\LocalLow\Sun\Java\Deployment\deployment.properties where the command line arguments are stored.

Adding test123 in the command line arguments changes the file to the following:

deployment.javaws.jre.1.location=http\://java.sun.com/products/autodl/j2se
deployment.javaws.jre.1.args=test123
deployment.javaws.jre.1.enabled=true
deployment.javaws.jre.1.registered=true
deployment.javaws.jre.1.product=1.6.0_22
deployment.javaws.jre.1.path=C\:\\Program Files\\Java\\jre6\\bin\\javaw.exe
deployment.javaws.jre.1.osarch=amd64
deployment.javaws.jre.1.osname=Windows
deployment.javaws.jre.1.platform=1.6

At least, I can manually edit the file and the changes show up in the Java Control Panel. The file's documentation can be found here.

like image 123
mhaller Avatar answered Oct 08 '22 11:10

mhaller