Does anyone have an idea on how to call something from JDK_INSTALL_FIR/bin using:
Runtime.getRuntime().exec(cmd)
Without having to care about OS terminal specifics like escaping or quoting spaces in paths on Windows or concatenating .exe
at the end of the command.
In other words I want to make this work on Windows:
Runtime.getRuntime().exec("C:\Program Files (x86)\Java\jdk1.7.0_45\bin\java -version")
I'm open to any solutions like bundling my own JDK, or generally anything that will save me from checking what OS I'm currently running on.
Thanks.