processingの実行中に何かのタイミングでPC内の別のアプリケーションを起動したい場合があります。
processingの実行と同時にGoogle Chromeが起動するようにしてみました。
import java.io.IOException;
Runtime rt;
void setup () {
size (800, 800);
try {
rt = Runtime.getRuntime ();
rt.exec ("C:/Program Files (x86)/Google/Chrome/Application/chrome.exe");
} catch (IOException ex) {
ex.printStackTrace ();
}
}
void draw () {
}