0

I was wondering, is there a way to check if a program takes input from keyboard or file at run time?

I want my application to determine other application's input method since it compiles and runs other applications using command line. My application is written in Java but it compiles programs written in many languages.

harpun
  • 4,022
  • 1
  • 36
  • 40
user2597012
  • 581
  • 4
  • 9
  • 28
  • You could measure the delay between the inputs. If one is using a keyboard they should be higher and if the input is provided as a file redirect. – harpun Oct 11 '13 at 22:05
  • My application only compiles and runs external applications, I found an article that talks about my issue, and it works when I run the command manually from CMD. However, it does notwork from eclipse even though it runs CMD. here is en example: java -cp externalApplication < input.txt – user2597012 Oct 12 '13 at 17:01

0 Answers0