How to pass console arguments to application in eclipse?

前端 未结 8 1535
广开言路
广开言路 2020-11-27 16:03

I have the following line in a batch file.

java Client \"127.0.0.1\" 9876

It contains the name of my java class and two arguments. My applicatio

8条回答
  •  天命终不由人
    2020-11-27 16:16

    Want to add something like, how to add multiple parameters.

    1. Right-click on your project.
    2. Debug > Debug Configurations
    3. Go to Arguments tab.
    4. Enter in your Program Arguments, each separated by a new line. (e.g 3 arguments in attached image)
    5. Click Apply or Debug

    enter image description here

    Hope it helps.

提交回复
热议问题