hi,
I am pretty new to Java and i have been trying to launch an application from the code, as in the user presses a JButton or something and the application opens.
But now I have a problem, i have an "unreported exception java.io.IOException;"
Now I am not sure what to do, I tried to catch it, but i dont know how, and and then i tried to throw it and that did work either.
if (event.getSource() == nItem) {
String command="/usr/bin/open/Applications/Firefox.app";
Process child = Runtime.getRuntime().exec(command);
}
This is the code, I dont know what to do, as in how and where to throw or to catch.
Thanks a lot
I am pretty new to Java and i have been trying to launch an application from the code, as in the user presses a JButton or something and the application opens.
But now I have a problem, i have an "unreported exception java.io.IOException;"
Now I am not sure what to do, I tried to catch it, but i dont know how, and and then i tried to throw it and that did work either.
if (event.getSource() == nItem) {
String command="/usr/bin/open/Applications/Firefox.app";
Process child = Runtime.getRuntime().exec(command);
}
This is the code, I dont know what to do, as in how and where to throw or to catch.
Thanks a lot