how to open a notepad in java?

package com.w3schools;
 
import java.io.IOException;
 
public class Test {
  public static void main(String args[]){
	try {
            Runtime.getRuntime().exec("notepad.exe");
        }
        catch (IOException e) {
            e.printStackTrace();
        }		
  }
}