Open Various Application using JAVA

The preceding Java code helps to open the application. 
  1. import java.io.*;  
  2. class Demo {  
  3.     public static void main(String[] args) {  
  4.         Runtime rs = Runtime.getRuntime();  
  5.         try {  
  6.             BufferedReader br = new BufferedReader(new InputStreamReader(System. in ));  
  7.             System.out.println("1-Want to open notepad");  
  8.             System.out.println("2-Want to open calculator");  
  9.             System.out.println("2-Want to open control panel");  
  10.             System.out.println();  
  11.             System.out.print("Select any option: ");  
  12.             int select = Integer.parseInt(br.readLine());  
  13.             switch (select) {  
  14.                 case 1:  
  15.                     rs.exec("notepad");  
  16.                     break;  
  17.                 case 2:  
  18.                     rs.exec("calc");  
  19.                     break;  
  20.                 case 3:  
  21.                     rs.exec("control panel");  
  22.                 default:  
  23.                     System.out.println("");  
  24.             }  
  25.         } catch (IOException e) {  
  26.             System.out.println(e);  
  27.         }  
  28.     }  
  29. }  
Thank you, keep learning and sharing.