Eclipse reading stdin (System.in) from a file

后端 未结 11 1970
轮回少年
轮回少年 2020-11-27 03:40

Is it possible for Eclipse to read stdin from a file?

11条回答
  •  隐瞒了意图╮
    2020-11-27 03:46

    The solution for me (running on a Mac, using Eclipse CDT for a C application) was to add "< path/to/somefile" at the end of other arguments in the "Arguments" tab of the "Run Configuration" dialog.

    Also check this other question for an answer involving launching a Java program in a suspended state and then attaching the debugger using Eclipse.

提交回复
热议问题