NOTEPAD OPENING USING JAVA

itprofessionalsrocks.blogspot.com
QUESTION:NOTEPAD OPENING USING JAVA:
Here we use ProcessBuilder class and create its object following is a simple program opening notepad using java.
import java.io.*;
import java.util.*;
class notepad
{
public static void main(String args[])
{

try
{
ProcessBuilder proc=new ProcessBuilder("notepad.exe","report");
proc.start();
}
catch (Exception e)
{
System.out.println("notepad not open");
}


}
}

Comments

Popular posts from this blog

REFLECTION OF A TRIANGLE (COMPUTER GRAPHICS)