Sunday, November 19, 2017

LAB 7 : PROCESS (SIMPLE)

PROCESS EXAMPLE: TO EXECUTE ANY PROCESS/APPLICATION
import java.io.IOException;
public class notepad {
    public static void main(String[] args) {
              Runtime rt = Runtime.getRuntime();
    try {
          rt.exec("notepad");
    }
     catch (IOException ex) {
     System.out.println(ex);
    }     
}  
}
 
OUTPUT: This will open the notepad

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.