import java.io.IOException; public class MainClass { public static void main(String args[]) throws IOException { ProcessBuilder proc = new ProcessBuilder("notepad.exe", "testfile"); proc.start(); } }