![]() |
IOException while using ProcessBuilder class I tried to start a program within a Java application using the ProcessBuilder class. This is the first time I'm using ProcessBuilder so I have no idea about what is happening...! Here is my code: Code: static void connectToHost(String Host) { When i use this method I get an IOException which says "Cannot run program "connect.exe" (in directory "C:\MyProgram\ExApp\shell"): CreateProcess error=2, The system couldn't find the specified file" Can anyone help me out with this? |
Re: IOException while using ProcessBuilder class Hey! Why don't you just provide the full path to connect.exe, rather than just connect.exe around with the system PATH? May be that could help...! Well i'm not at all good at coding...! Anyways, All the best...! |
Re: IOException while using ProcessBuilder class Hey! I guess the working directory is not used to search for the executable connect.exe . connect.exe must be located in a directory that is on the 'path'. Well try it out and post if it works....! All the best...! |
All times are GMT +5.5. The time now is 02:47 PM. |