public class TestProcess
{
public static void main(String[] args)
{
try
{
Process process = Runtime.getRuntime().exec("cmd.exe /c notepad.exe C:/Users/Administrator/Desktop/file.txt");
}
catch (Exception e)
{
e.printStackTrace();
}
}
}