The problem with your first approach was that you wrote 'Java', not 'java', as the screenshot proves.
http://www.washington.edu/computing/unix/commandcase.html
If you do it the right way, it will work.
Also, it's not a good idea to have the filenames fixed in the command: Your program will not work when two processes are doing the validation simultaneously. It's better, as I told you, to custimze the command to allow additional parameters and to generate unique filenames (for example with GUID's) at runtime.