Discussion:
Where are Java System Properties stored?
(too old to reply)
k***@gmail.com
2015-04-21 07:52:37 UTC
Permalink
On Tue, 20 May 2003 10:50:41 -0400, "Jiong Tang"
It gives me a quite long list. But I am wondering where do they come from?
Are they stored somewhere in a file and etc?
They are not stored. They are generated by a native method.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/iraq.html for links about the Iraq war.
Hi,
For the above query i wanted to know whether i can access the system property explicitly through following code:
Properties p = System.getProperties();
p.put("check_value", "true");
System.setProperties(p);

now the property is returning null when i access it in different process/application with
System.getProperty("check_value").

is there any way by which we can set the system property which is accessible to all the processes
Joerg Meier
2015-04-21 10:12:01 UTC
Permalink
Post by k***@gmail.com
Properties p = System.getProperties();
p.put("check_value", "true");
System.setProperties(p);
now the property is returning null when i access it in different process/application with
System.getProperty("check_value").
is there any way by which we can set the system property which is accessible to all the processes
That is not possible in Java. Your only solution as far as I know is to
call an external program, such as the system shell, and use that to set
environment variables. Java only holds a copy of the properties, so no
matter what tricks you try, you will not be able to affect the outside
world.

Liebe Gruesse,
Joerg
--
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.
Loading...