This content has been marked as final. Show 4 replies
Setting System property only affects the current JVM. If you start two Java programs one after the other, then calling setProperty() in the first one won't influence the second one in any way.
Thanks for your reply.
Actually my requirement is like that. Is it possible to do this or can not perform this operation?
S_Szenthilkumar wrote:What do you mean by "like that".
Actually my requirement is like that.
What is your requirement?
Is it possible to do this or can not perform this operation?Define "this operation".
It might be that you actually want to use the [Preferences API|http://java.sun.com/javase/6/docs/api/java/util/prefs/Preferences.html] for storing settings. But it's hard to tell what you actually want, since you didn't describe your goal, but only a possible solution.
If your goal is to maintain data across JVMs -- that is, a JVM starts, the JVM writes some data, the JVM ends, then a wholly different JVM process starts, and that second JVM reads the data that the previous JVM wrote -- you should know that the word generally used to refer to that is "persistence".