java - Change content of batch file -
how change content of batch file using java code?
i worked parsing xml using java program. worked fine. can same batch file using java?
i able run batch file using below code.
string command = "cmd /c start " + batfile; runtime rt = runtime.getruntime(); rt.exec(command); the content of batch file is:
@echo off cd c:\program files (x86)\sourcemonitor start sourcemonitor.exe /c "c:\shravani-workspace\appanalytix\src\main\resources\appanalysis.xml" exit but before doing want change location
c:\shravani-workspace\appanalytix\src\main\resources\appanalysis.xml ..to user given xml location. how can achieve in java application?
how passing command line args bat file so:
@echo off cd c:\program files (x86)\sourcemonitor start sourcemonitor.exe /c %1 exit then modify java code pass in xml file name after bat file name
Comments
Post a Comment