File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Set system property from outside during runtime

 
Lukas Stephienn
Ranch Hand
Posts: 60
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Is there any possible way to set system property during runtime of virtual machine from outside world.

For example:
I start some app that will work for a long time. I start it with property -DmyProp=myVal.
While this app is working, I want to change myProp to "otherVal", but I don't want to do it from within app. I want to change that property from OS (or something like that) because I want to have possibility to set it on runtime, and I don't want to modify code of this app.

Can anybody say, is that possible?

Thanks in advance
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope, not possible, not without modifying the app. If you can modify the app, then you'd need to make it listen for input somehow, most likely on a Socket.
 
Peter Chase
Ranch Hand
Posts: 1970
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about via debugging interface? These let an external program into the JVM, don't they?

Of course, a production Java program ought to have debugger interfaces turned off (mine do - I hope).
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic