The program I'm using runs through the command prompt from java using a batch file (following the solutions from Run .exe file from Java from file location, and at one point of time, it will prompt the user for an input which is either a 'y' or 'n' in order to continue the program.
How do I program using java codes such that the value 'y' or 'n' is automatically entered when prompted, without requiring users to enter it manually? I have tried using pipe (following the solutions from How do you enter something at a DOS prompt Programmatically?) but it doesn't work. Any ideas?