Problem in FireFox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yaha1982
    New Member
    • Jul 2007
    • 5

    Problem in FireFox

    Hi, Friends

    I am trying to one firefox at runtime through java code but it gives error. I don't get why such type of error occures.
    My code is :
    try {
    Runtime.getRunt ime().exec("fir efox");
    } catch (IOException e) {
    e.printStackTra ce();
    }


    But It gives error such as below:
    java.io.IOExcep tion: CreateProcess: firefox.exe error=2
    at java.lang.Proce ssImpl.create(N ative Method)
    at java.lang.Proce ssImpl.<init>(U nknown Source)
    at java.lang.Proce ssImpl.start(Un known Source)
    at java.lang.Proce ssBuilder.start (Unknown Source)
    at java.lang.Runti me.exec(Unknown Source)
    at java.lang.Runti me.exec(Unknown Source)
    at java.lang.Runti me.exec(Unknown Source)
    at RuntimeBrowser. main(RuntimeBro wser.java:7)



    If possible then give me a reply as soon as possible.
    Thanks
    Anup A. Patel.
  • prometheuzz
    Recognized Expert New Member
    • Apr 2007
    • 197

    #2
    Originally posted by yaha1982
    ...

    If possible then give me a reply as soon as possible.
    Thanks
    Anup A. Patel.
    When posting answers here, it's always as soon as possible, so next time, please omit that request. It looks like you're rushing people who answer here into answering you first.
    About your problem: try providing the entire path to your exe file.

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      It's also a double post.

      kind regards,

      Jos

      Comment

      Working...