I want to execute notepad(C:\a.txt) after typing another char.
This code open a.txt with notepad but when i was write "Java" , i want to show my console Java. after when i was write " then Java" i want to show my console Java then Java".
Process process = Runtime.getRuntime().exec("notepad.exe C:\\a.txt");
InputStreamReader read = new InputStreamReader(process.getInputStream());
while(read.read() != -1){
System.out.println(read.read());
}