wood burning stoves*
The moose likes Java in General and the fly likes  Changing java system properties permanently Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark " Changing java system properties permanently " Watch " Changing java system properties permanently " New topic
Author

Changing java system properties permanently

andy armstrong
Ranch Hand

Joined: May 14, 2002
Posts: 154
I want to be able to add a system property for all java apps run
on my xp windows box. For example add the
-Dcom.jmx.remote to all java applications run.

IS there a properties file I can edit to add the parameter.


Certifications: <br />scp2, scea, scwcd, WL7.0, CISSP, XML
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

On Windows:

C:\Documents and Settings\<your name>\Application Data\Sun\Java\Deployment\deployment.properties

For instance, after setting parameter "-Xmx500" for applets using the control panel, the following line appeared:

Now that is for applets - I have no idea if that also works for "regular" applications. But that's most likely the place to go.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
andy armstrong
Ranch Hand

Joined: May 14, 2002
Posts: 154
This does not work. It only sets the properties for app run using webstart.
I want the property to be set for any java application run.
andy armstrong
Ranch Hand

Joined: May 14, 2002
Posts: 154
Where do the default system propeties get set?
Sivaraman Lakshmanan
Ranch Hand

Joined: Aug 02, 2003
Posts: 231
Hi Andy,
You can set the system property value by just have a simple batch file with all the properties you want to set and run the batch file before your application starts. One more way is you can set the property in the environment variable setting of your system.

If you are using any servers you can drop the variable in the startup batch file also

Hope this helps.


Regards,
Sivaraman.L
andy armstrong
Ranch Hand

Joined: May 14, 2002
Posts: 154
The point is I do not want to set them on the command line. If you
set them as a environment variable they do not get picked up. I want the variables to run for any jre that is run.
The question still remains where can you set the default system properties in java?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing java system properties permanently
 
Similar Threads
Properties
Absent Line Number Information - I'm NOT using Ant
regarding user Environmental variable.
System Properties!!
getProperty