0

public class TestNetbeans {

public static void main(String[] args) {
    try {
        ProcessBuilder processBuilder = new ProcessBuilder(
                "./netbeans-7.0.1-ml-linux.sh", " --silent");
        // ProcessBuilder("./netbeans-7.0.1-ml-linux.sh"," --silent"," -J-Dnb-base.jdk.location=/home/nayum/Documents/jdk1.6.0_23/jre");
        Process process = processBuilder.start();

        process.waitFor();


    } catch (Exception e) {
        System.out.println(e);
        e.printStackTrace();
    }
}

}

This code when executed on command prompt it works fine for the silent installation of netbeans but when executed in eclipse its execution is terminated. What is the problem and solution ???

4

0 回答 0