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
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: How to Redirect Java Command Prompt output to a Browser dynamically?