| 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
Saloon Keeper
Joined: Aug 03, 2008
Posts: 9189
|
|
|
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
|
 |
 |
|
|
subject: Injecting properties to a running java program
|
|
|