public static void startNotepad(String name) {
        Process asd;
        Runtime r = Runtime.getRuntime();
        try {
            asd = r.exec("notepad " + name);
            asd.waitFor(10, TimeUnit.SECONDS);
            System.out.println(asd.isAlive());
            if (asd.isAlive()) {
                asd.destroy();
            }
            System.out.println("Exit code: " + asd.exitValue());
        } catch (IOException e) {
            e.printStackTrace();
        } catch (InterruptedException ex) {
            ex.printStackTrace();
        }

    }