To set custom values you will need to use System.setProperties() method passing the property table.
Eg.
java.util.Properties p = new java.util.Properties(); p.setProperty("Hello", "Hi"); System.setProperties(p); System.Console.Write(System.getProperty("Hello"));
Thanks for the feedback. Your request for this JDK 1.2 level method in the future releases has been noted. Like all other requests from our customers about what they would like in our future releases, this request also would go through our planning/investigation process.
That's what I am doing. And it's test code so the performance is not critical. But it's a pain to have to do this in 27 places. Please for .net 2.1 add this method as I am sure others will need this too (for common source code).
I need System.setProperty(String, String)
Mehmet Ozdemir
passing the property table.
Eg.
java.util.Properties p = new java.util.Properties();
p.setProperty("Hello", "Hi");
System.setProperties(p);
System.Console.Write(System.getProperty("Hello"));
Hope this helps.
Daison
Thanks for the feedback. Your request for this JDK 1.2 level method in the future releases has been noted. Like all other requests from our customers about what they would like in our future releases, this request also would go through our planning/investigation process.
With regards
Ashwin Raja
D-S
java.util.Properties p = System.getProperties();
or
java.util.Properties p = new java,util.Properties(System.getProperties());
p.setProperty("Hello", "Hi");
System.setProperties(p);
System.Console.Write(System.getProperty("Hello"));
The latter one has a performance problem when we set many properties.
Simba
be specific please
Karthikeyan K
That's what I am doing. And it's test code so the performance is not critical. But it's a pain to have to do this in 27 places. Please for .net 2.1 add this method as I am sure others will need this too (for common source code).
thanks - dave
Pete Lux
System.setProperty("key", "value");
and the compiler says there is no setProperty(String, String) method.
thanks - dave