Hello,
I am working on a project where at one point, I have to login to an external program from my
java program.
To do so, I have implemented the following function:
This function successfully sends the "p4 login" function to the terminal, but apparently, the next command where I send the password does not work.
I know this because of the output I receive after the System.out.println(); Indeed, the output is always "Enter password", which is the anwser of the first command.
I have tried other stuff, such as :
but the result is always the same.
I guess the exec() function can only send standard commands to the terminal, so is there a way to send a normal
string to it?
Thank you in advance