I have an app that uses the Runtime class to execute a batch file in Windows. This is a batch file that runs perfectly when I execute it from the command line. When run from my Java app, however, it runs the first part of the batch file without a hitch, then abruptly stops processing when it reaches the following line:
for %%X in (*.png) do rundll32.exe c:\windows\system32\\shimgvw.dll,ImageView_PrintTo /pt "c:\eclipse\workspace\station1\%%X" "\\myprintserver\printer1"
All of the commands before that line are executed, but neither that line nor any of the commands after it are.
Is there something special about the Java environment that would prevent this command from executing properly?