I’m writing my Java app a update mechnism.
I create a windows batch file,exit my program and the batch file continues to delete my Jar, copy the new one from a remote location, start the jar.
My problem: deletion + copy works, BUT – the application won’t start.
I think the problem is that I don’t know how to make Java to execute batch file in separate process tree.
when running this:
Runtime.getRuntime()
I open a child process.
So my question – How can Java execute batch file in separate process tree?
Here is a workaround that uses cmd as the interminent layer:
where test.bat will contain