Results 1 to 2 of 2

Thread: runtime.getruntime() crash

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    228

    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

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    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
  •  



Click Here to Expand Forum to Full Width