Running a jar with Process Builder

Answered

Im trying to run a new process with the process builder when i click a button. The jar works when i double click it and also works if i run it from the cmd. But when i try to run it from another java application it gives me an IOException.

 

Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application

 

this is my source code:

String file = "D:\\GitProjects\\nr1robotics_internshipdev\\PepperDashboard\\src\\main\\resources\\Pepper-Watson_InteractionApplication.jar";
ProcessBuilder p = new ProcessBuilder();
p.command(file);
p.start();
0
1 comment

Hi. I am not sure this is an IDE specific problem. Try asking at https://stackoverflow.com.

0

Please sign in to leave a comment.