• Post Reply Bookmark Topic Watch Topic
  • New Topic

Read runtime heap options at runtime  RSS feed

 
Yogesh Bhor
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

Can anyone tell me how to read heap options like -XMX or -XMS or -NEWSIZE using java program

Thanks and regards,
yogesh
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Those arguments are taken by the JVM for configuration purposes, and are not passed to the main() method. There is really no reason for the application to parse those arguments, but if you must have them, they can be accessed via the java.lang.management.RuntimeMXBean class.

Henry
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!