Seetharaman Venkatasamy wrote:perhaps, main method's argument?
I believe JVM arguments (such as -Xms) are not part of the main method arguments.
As for the original question, the behaviour of
RuntimeMXBean.getInputArguments() is JVM-implementation specific. So, I would not recommend relying on it too much. Usually, application code does not need (or care) about what JVM arguments were supplied to the runtime, and for good reason. However, if you do want to have the application behave differently in say, different memory conditions etc., there are ways to get those settings from Runtime, instead of getting JVM arguments (and parsing them etc.).
IMHO, try to get what you want directly from Runtime, instead of worrying too much about the exact JVM arguments supplied via command-line.