I want to redirect Command Prompt output from java program to a Browser dynamically. 1. I have written the output to a File using FileOutputStream 2. Now using Runtime class, I want to invoke that .html file dynamically. 3. I am using exec() method, but its not working . Please suggest the syntax for writing command line string inside the exec() method or, some other way to do conversion function...
Hi Jasdev, All you have to do is to write to the content you want to display on to the browser with HTML tags to a file and name it with .html extenstion. Runtime.getRuntime.exec("c:\program files\plus!\microsoft internet\IEXPLORER.exe filename.html"); This should trigger a brower with I.E and loads the file. I Hope I have solved your problem
subject: How to Redirect Java Command Prompt output to a Browser dynamically?