I have an java program that runs external programs executing commandline parameters. After making some searches I found that some people are running .bat files for doing that.
Which is best way for this case?
- Execute command
- Execute bat file
Also I wonder anybody that experienced about running external applications from java,
which problems they come up and are there any unsolvable problems ?
Thanks,
Use the apache exec library.
http://commons.apache.org/exec/
It tries to solve the issues mentioned here:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
The article describes all the traps that Runtime.exec() throws at you..