|
-
Feb 23rd, 2010, 07:21 PM
#1
Thread Starter
Addicted Member
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 ");
}
Last edited by ayahnabunda; Feb 23rd, 2010 at 07:34 PM.
effort effort effort and still effort
-
Feb 24th, 2010, 02:17 AM
#2
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?
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|