[Solved] Help with Overriding a Prompt in UNIX/Java

I am executing a shell script which contains a jar call to an external java package for which I don�t have a read access to. The external package was written in such a way that whenever we make a java �jar call to the package, it shows a prompt on the console asking if we want to continue or no (Y/N).

My requirement is to override this prompt so that there won�t be any interruption in between. Problem here is that it�s a third party jar package and I can�t(must not) edit the java code to remove the prompt.
I want to know if there any such functionality or a round about approach in Unix Shell Scripting so that I can pass the value Y in the call itself or don�t want the prompt to be displayed at all.

Thanks in advance.

CheerS

---------- Post updated at 07:41 PM ---------- Previous update was at 11:23 AM ----------

Hi all,

We were able to resolve this.

the jar call was made like,

 
java -jar xyz.jar
 

Now it was changed to,

echo y | java -jar xyz.jar

It works like charm.

Thanks.
Please close this thread.

Thanks for letting us know you solved...