Is there any method of running a jar file from java using something like process builder? I've tried this method but having no luck as I keep getting CreateProcess error=2, The system cannot find the file specified
. I've ran the same script outside of the java program into a powershell window and it works just fine.
Code I've tried
ProcessBuilder processBuilder = new ProcessBuilder("Powershell.exe java -jar D:\\Outlook.jar");
Process process = processBuilder.start();
process.waitFor();