Reputation: 647
I was wondering why doesn't Eclipse recognize the command (command2="java -cp "+ args[0] + " " + args[1] + < input.txt";)
when I run the command from eclipse, but it works when i run it directly from CMD. How can this issue be fixed?
Thanks
Upvotes: 0
Views: 120
Reputation: 41281
There's a missing quote:
command2="cmd -C \"java -cp "+ args[0] + " " + args[1] + "< input.txt\"";
Even with redirection, <
is still an explicit character (not an operand) in a string representation of the command.
Upvotes: 0