You are here
Home > Java > Control Applications Using Java

Control Applications Using Java

Today I am going to create a java program by which you can control other application/software. In this program “ProcessBuilder” Class is used. ProcessBuilder class is predefined class which provides feature to start a process. There is start method in this class which is responsible for starting the process and it returns “Process” object. Using Process object you can stop/destroy that process also which was started earlier using ProcessBuilder object. I am not using Process object in this program but you can use it according to your program/application logic.

So here is the code, just copy or type the code into notepad or your favorite text editor and save it as Then compile it and run it and follow the instruction.


1. Open Notepad
2. Open Paint
3. Open Internet Explorer
4. Open Window Media Player
0. Exit
Choose Option (0 – 4):

Thank You

Please Share if you like it

Rajesh Kumar Sahanee
I am a passionate Java Developer and I like Computer Programming. I love to do some interesting experiments and listening music in my free time.