How to open windows notepad with Java

1 Answer

0 votes
package javaapplication1;

public class JavaApplication1 {

    public static void main(String[] args) {

        try {

            ProcessBuilder p = new ProcessBuilder();

            p.command("notepad.exe");
            p.start();

        } catch (Exception e) {
            System.out.print(e.toString());
        }
    }
}

/*
             
run:


    
 */

 



answered Nov 27, 2016 by avibootz

Related questions

1 answer 200 views
1 answer 240 views
1 answer 202 views
1 answer 163 views
163 views asked Oct 13, 2018 by avibootz
1 answer 221 views
221 views asked Oct 13, 2018 by avibootz
1 answer 238 views
1 answer 222 views
222 views asked Oct 5, 2018 by avibootz
...