How to open Google Chrome in windows with Java

1 Answer

0 votes
package javaapplication1;

public class JavaApplication1 {

    public static void main(String[] args) {

        try {

            ProcessBuilder p = new ProcessBuilder();

            p.command("C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe");
            p.start();

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

/*
             
run:


    
 */

 



answered Nov 27, 2016 by avibootz

Related questions

1 answer 251 views
1 answer 196 views
1 answer 180 views
1 answer 178 views
1 answer 208 views
1 answer 145 views
1 answer 158 views
...