runtime.getruntime() crash
I'm trying to execute external exe which is plwin.exe which is prolog. but it crash right out of the bat. can you help me with this guys?
this is the code
Code:
public PrologGuiTopComponent() throws IOException {
initComponents();
setName(NbBundle.getMessage(PrologGuiTopComponent.class, "CTL_PrologGuiTopComponent"));
setToolTipText(NbBundle.getMessage(PrologGuiTopComponent.class, "HINT_PrologGuiTopComponent"));
// setIcon(ImageUtilities.loadImage(ICON_PATH, true));
String temp = "C:/Program Files (x86)/pl/bin/plwin.exe";
try{
p = r.exec(temp);
// p = Runtime.getRuntime().exec("C:/Program Files (x86)/pl/bin/plwin.exe");
p.waitFor();
p.destroy();
}catch(Exception e)
{
System.out.println("error executing ");
}
Re: runtime.getruntime() crash
A windows path uses back not forward slashes, but I'm not sure if it will crash. What error or exception do you get?