How to pass console arguments to application in eclipse?

前端 未结 8 1514
广开言路
广开言路 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:07

    Instead of just hitting the "Run" icon, select the dropdown box next to it, and choose "Run Configurations". Find your application (or create a Run Configuration for it) and put the command line arguments in the "Arguments" tab. See the docs for more information. It should look like this:

    enter image description here

提交回复
热议问题