IntelliJ IDEA: Run java with args from external file

后端 未结 3 1612
情书的邮戳
情书的邮戳 2020-12-06 16:39

I want to run a java class with args supplied as a file.

On shell, i can do

    java SomeClass < 1.txt

Is there any equivalent f

3条回答
  •  鱼传尺愫
    2020-12-06 17:10

    You can actually do that now, starting from version 2018.3:
    - Select "Run/Debug configurations"
    - Set path to input file at "Redirect input from" field

提交回复
热议问题