How to pass console arguments to application in eclipse?

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

    See the run configurations. You can specify arguments. You can even prompt the user for arguments, along with defaults:

    ${string_prompt:host:127.0.0.1} ${string_prompt:port:9876}
    

    The first prompt is host, with default value 127.0.0.1 filled in. Second pop-up has the prmpt port, with 9876 filled in

提交回复
热议问题