How to open eclipse using java program?

Total Post:29

Points:203
Java 
 1149  View(s)
Ratings:
Rate this:
I tried to open eclipse with particular workspace using following program but its not working.

Runtime runTime = Runtime.getRuntime();
Process process = runTime.exec("eclipse.exe \"D:\\Research_&_development\"");

  1. Post:88

    Points:616
    Re: How to open eclipse using java program?

    Use this code to open eclipse by your code:


    class openEclipse {
        public static void main(String args[]) {
            try {
                Runtime.getRuntime()
                        .exec("F:\\eclipse-standard-luna-R-win32-x86_64\\eclipse\\eclipse.exe -data D:\\new");
            } catch (Exception e) {
     
            }
        }}

     


      Modified On Apr-06-2018 01:34:19 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!