I want to execute this command in SpringBoot application:
keytool -import -keystore trustStore.jks -file certCA.der -storepass example << EOF
\ yes
\ EOF
My problem is that I'm not able to insert "yes" automatically in my code.
Runtime.getRuntime().exec("keytool -import -keystore trustStore.jks -file certCA.der -storepass example");
How can I do that?