Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java override runtime setting??

 
kirrran kir
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Any help is appreciated.

is it possible to override the switches provided to the jvm programmatically?
Eg., if jvm is started like this

java -Xms64m myprog, then is it possible to set the "Xms" value inside my java program during run-time.

thanks
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, not in general. Switches like -Xmx set up the structure of the Java heap, which is already initialized and operating by the time your code gets control.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here at the Ranch, we consider it quite rude to post the same question to more than one forum. Please Read this before posting again. I've deleted the other two copies of this topic.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!