Open System Property Using Java



import java.io.IOException;

public class OpenChrome {

public static void main(String[] args) {

Runtime run = Runtime.getRuntime();

try

{

run.exec("calc.exe");

}

catch (IOException e)

{

e.printStackTrace();

}

}


}

______________________________________________________________________

import java.io.IOException;

public class OpenChrome {

public static void main(String[] args) {

Runtime run = Runtime.getRuntime();

try

{

run.exec("notepad.exe");

}

catch (IOException e)

{

e.printStackTrace();

}

}

}
______________________________________________________________________

import java.io.IOException;

public class OpenChrome {

public static void main(String[] args) {

Runtime run = Runtime.getRuntime();

try

{

run.exec("mspaint.exe");

}

catch (IOException e)

{

e.printStackTrace();

}

}


}

No comments: