PBDemo.java
2017-08-31 16:32:44    249    0    0
gaara
class PBDemo {   
        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.");   
                }   
        }   
}  

 

Pre: ProcessBuilderTest.java

Next: Java运行Linux原生程序

249
Sign in to leave a comment.
No Leanote account? Sign up now.
0 comments
Table of content