Hello
I created a java project wit package call test.mytest.bat. I have some java files and a run.bat file in this package. I an trying to run this bat file through java using
Runtime.getRuntime().exec(
"/run.bat " + arg1 + " " + arg2);
It does not find this bat file.But when I copy this file to c drive and give absolute path
Runtime.getRuntime().exec(
"C:/run.ba
t " + arg1 + " " + arg2);
it works fine.
So how do I make it work from this java package.
Thanks
Start Free Trial