I would like to know how to create a file / directory in remote machine using Java11 ?
I did try to use:
process = Runtime.getRuntime()
.exec("ssh root@" + hostname + " 'mkdir -p "+mdbDir+"'")
.wait() or waitFor();
But i am getting an exception even though i use wait()
java.lang.IllegalThreadStateException: process has not exited
Please let me know what can be done.