This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes System.getProperty - Different JVM's 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 "System.getProperty - Different JVM Watch "System.getProperty - Different JVM New topic
Author

System.getProperty - Different JVM's

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1371
How to set and get values using System.setProperty() and System.getProperty(). setProperty() and getProperty in two different classes in two differeent JVMs.
Tushar Kapila
Ranch Hand

Joined: Dec 23, 2007
Posts: 35

* do you have a list of properties that you want to load in to both jvms?

can load them from a java properties file and add them to the system properties

* do you want to send a new property added in jvm 1 to jvm 2?

http://thehungersite.com | http://www.worldcommunitygrid.org/
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1371
* do you want to send a new property added in jvm 1 to jvm 2?


How to send a new property added in jvm 1 to jvm 2?
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1371
Any reply ?
Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 866
    
    5
It won't work directly on the System property level, you could devise a custom interprocess-communication way.

You could listen on a socket on the second JVM and accept and interpret messages triggering setting of the System properties.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: System.getProperty - Different JVM's
 
Similar Threads
os
Environment Variable!!
command line jar parameters
WorkingDirectory
path of db.db