This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Injecting properties to a running java program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Injecting properties to a running java program" Watch "Injecting properties to a running java program" New topic
Author

Injecting properties to a running java program

Daesung Park
Ranch Hand

Joined: Mar 22, 2007
Posts: 68
Hi,

Is it possible to inject(or modify) properties to a running java program?
For example, is the following scenario feasible?
1. Run a java program
> java -Dprop="x" mytest.class
2. Get pid
> jps
3. Inject a property
> injectprop [pid] prop="Y"
(injectprop is imaginary one.)

I think it is impossible.
If it is really impossible, can you let me know related Java specifications or just links?

Daesung Park

BLOG
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

I don't know about regular properties loaded into jvm but you can load a set of custom properties from a properties file using Properties and File classes...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Injecting properties to a running java program
 
Similar Threads
setting JAVA_HOME Explicitly
Java & Outlook integration - how to go about it
javadoc generator
Making jstack in Java 5 work.
SendFailedException for sending simple email by using JavaMail