Run Program from IntelliJ with Command Line File Input

后端 未结 6 422
青春惊慌失措
青春惊慌失措 2020-12-19 07:34

I am running OSX 10.11 with IntelliJ 14.1.15.

I have a programme which takes a txt file as an argument. I can run it from the terminal through java Searc

6条回答
  •  情歌与酒
    2020-12-19 08:31

    I had the same issue and was very confused with the previous answers of this question, so here is my explanation to anyone that is lost like I was.

    With the project open.

    Run > Edit Configurations....

    Add the whole directory that the file is in it on the Program Arguments field with the file format at the end.

提交回复
热议问题