Is there a way to redirect input from file to stdin in Netbeans?

后端 未结 5 1351
忘了有多久
忘了有多久 2020-12-31 09:11

I\'m developing application with Netbeans and Maven. My application should obtain data from stdin. But I could not understand how to test it. Putting < data.txt

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-31 09:35

    Add a new target "run-input" under Files->build.xml with the following text. Note: this version uses the correct location of the java runtime. Also, it assumes that you have made a directory called inputs with the file input1.

    
      
        
        
      
    
    

    You can always create a shortcut for this new target.

提交回复
热议问题