I'm using curl for certificate-based/x509 authentication `
String command = "curl --cert " +certificateFilePath+" --key "+ certificateKeyFilePath+" --insecure "+authUrl;
ProcessBuilder process = new ProcessBuilder(command);
Process p;
try
{
p = process.start();
BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
StringBuilder builder = new StringBuilder();
String line = null;
while ( (line = reader.readLine()) != null) {
builder.append(line);
builder.append(System.getProperty("line.separator"));
}
String result = builder.toString();
System.out.print("result ------------------: "+result);
}catch(Exception e){
e.printStackTrace();
}
`
but getting exception `
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
`
given that the application and auth service are running inside docker-container on Ubuntu and works fine when I manually go inside the application docker-container and execute the above curl command. Please help