satheesh
New Member
- Messages
- 883
- Reaction score
- 0
- Points
- 0
Code:
Save as "Notepad.java" and Compile and Run it.
Good Luck.
Code:
class Notepad{
public static void main(String arg[]){
Runtime r=Runtime.getRuntime();
Process p=null;
try
{
p=r.exec("notepad");
p.waitFor();
}
catch(Exception e)
{
System.out.print("Fail to Open Notepad Opened");
}
System.out.print("Notepad Closed"+p.exitValue());
}
}
Save as "Notepad.java" and Compile and Run it.
Good Luck.