Frage

Is there some way by which, I can get the list of all supported JVM arguments via some API ?

I am writing a program where i need to merge two files which contain JVM arguments. In existing file i need to put new incoming parameters and also merge the value of parameters on both the sides (preference will be given to already existing value).

So, I want to get a list of all possible JVM arguments which can be present in the file.

I don't want to put a hard coded list as my program will be running across multiple platforms like windows, linux and unix etc. and JVM on each platform can have different list of supported arguments.

So i want to write the program in a way which works across multiple platforms.

Thanks in Advance.

War es hilfreich?

Lösung

The list of all possible arguments of all possible JVMs is, by necessity, always incomplete, even if you restricted yourself to a range of JVMs from a single vendor. And even if you had one, the next patch would probably allow yet another -X.... option.

What is more, such a list wouldn't tell you if a given combination of command line arguments would be correct for a certain, but unknown, JVM. For this, you would need the intersection of the allowed command line arguments of a set of JVMs. Depending on what versions you want to support, it will probably turn out that you could only have non -X... options, except maybe the most common ones like -Xmx, -Xss and -Xms

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top