Skip to main content

Posts

Showing posts with the label exe

Controlling an executable from Java program

Windows tools like Notepad, internet explorer and other executable files can be started from java program through its core API. Procedure to start a Notepad application from java program:  Create an object for Runtime class                          Runtime runtime = Runtime.getRuntime();         Create the command string                          String command = "notepad.exe";         Call exec()                          try{                              Process process = runtime.exec(command);                          }catch(IOException e){                 ...