January 07, 2012

how to invoke system calculator in java

how to invoke system calculator in java


/**
*
* @see
* @param
* @return String
* Description : displayCalculator() displays system calculator on screen
*
* Date : Oct 31, 2009
* Coded by : +joseph james
*/
public String displayCalculator(){
Process process = null;
try {
process = Runtime.getRuntime().exec(“calc”);
}
catch (IOException e) {
e.printStackTrace();
}
catch (Exception exp){
JOptionPane.showMessageDialog(null, ” use Microsoft xp “);
}
return SUCCESS;
}

Facebook comments