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.
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.
Comment