I'm trying to get my java program to run an svn command from the command prompt, which will write logs to an xml file.
This is what I want it to do:
Runtime.getRuntime().exec("cmd.exe /c svn log /location/ --xml > c:\\output.xml");
however, it will not print anything to the xml file.
when I enter the "svn log /location/ --xml > output.xml" directly into cmd, though, it will print the logs as expected, into the xml file.
furthermore, when I use the following code, it will print "test" into the xml file without problems.
Runtime.getRuntime().exec("cmd.exe /c echo \"test\" > c:\\work\\output.xml");
OK, after reading When Runtime.exec() Wont, I've determined that for some reason, svn is not recognized when I run the command with java, but it is perfectly fine when I enter it manually into the command line
Any ideas? Let me know if you have any questions that i might be able to help you with.