MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

class MainClass {
    public static void main(String args[]) {

        try {
            ProcessBuilder proc = new ProcessBuilder("notepad.exe", "testfile");
            proc.start();
        } catch (Exception e) {
            System.out.println("Error executing notepad.");
        }
    }
}