Call Windows Calculator Using Java

How to Call Windows Calculator/Application in in Java Program ?

  • To call the inbuilt windows calculator in java you have to use java.io package.
  • Using This code you can call any windows Application .


[java]
import java.io.*;

class WinCalc
{
public static void main(String args[])
{

try
{
Runtime.getRuntime().exec("calc");

}
catch(Exception e)
{
e.printStackTrace();
}
}
}
[/java]

Share

About the Author

Akash Padhiyar

Visit Website

There are no comments yet, add one below.

Leave a Comment

Your email address will not be published. Required fields are marked *

*

Time limit is exhausted. Please reload CAPTCHA.