Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does jar differentiate between program arguments and jvm arguments

I am trying to execute a jar file. It needs both program arguments and the jvm arguments. Do we need to do something different while passing the command line parameters in order for it to be able to differentiate them, or it will be handled automatically?

Currently I am using eclipse IDE, so I can configure it. However it will be finally run using command line only. Please let me know if something needs to be done differently.

like image 458
KaustubhSV Avatar asked Oct 26 '25 10:10

KaustubhSV


1 Answers

Well, the JVM arguments are typed before using '-D', then after the jar file you'll type your program arguments:

java -Djvm_argument1=XXX -Djvm_argument2=YYY -jar myjar.jar my_argument1 my_argument2
like image 148
Eduardo Yáñez Parareda Avatar answered Oct 27 '25 23:10

Eduardo Yáñez Parareda



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!