I am trying to run the following command using ProcessBuilder that runs perfectly on a Windows command prompt:
Below is the code that has partly work but has difficulty reading input and producing output files:
This code appears to have worked as it displayed all the warning messages in standard output. However, it could not direct the output XML format to C:\Temp\NewXMLFormat.xml. Instead, the following error messages were generated in the standard error output:
Error: Can't open "<"
Error: Can't open ">"
Error: Can't open "NewXMLFormat.xml" Looks like I need to some how direct the OldHTMLFormat.html file to the ProcessBuilder and the same applies to NewXMLFormat.xml.
Please take note of Piet Verdriet's point; you ought to tell us when posting on multiple sites. Please also go to Sun and add a post saying "posted on JavaRanch at [url=http://saloon.javaranch.etc.etc.etc".]http://saloon.javaranch.etc.etc.etc".[/url]
The stream redirects are evaluated by the command line, not by the executed program. See Listing 4.5 in the article that Campbell pointed you to.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus