What's the difference between program arguments and VM arguments?

前端 未结 5 1944
忘了有多久
忘了有多久 2021-01-31 03:15

I found only when I put -Dcontext=web into VM arguments, the value can be read by System.getproperty method. I am wondering what\'s the difference betw

5条回答
  •  孤街浪徒
    2021-01-31 03:26

    • Program arguments - arguments which we normally pass into our program. This type parameters can be accessed using "args" String array in the main method.
    • VM arguments - arguments which are passed into the Java interpreter.

提交回复
热议问题