I have a c# console application I will be sending commends to using Java, with the techniques described here Sending commands to a console application?
My issue is that the console application is in a folder that's in the same folder with the jar, and I can't find out how to execute a file relative to the same directory as the jar.
I tried a lot of things in Java, like
Process pr = Runtime.getRuntime().exec("runtime_libraries/consoleapp.exe");
But it says the file can't be found.
java.io.IOException: CreateProcess error=2, The system cannot find the file specified
I assumed it would be simple, but apparently it's not.
So my question is, how can I put a relative path into the Runtime exec?