Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Ivica Boskovic

Greenhorn
+ Follow
since Nov 28, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ivica Boskovic

It is executed, since when I put something like
log.info("...");

at the end, it is executed. I saw cmd in the list of windows processes.

It is always the same, no metter of the content of the bat file,
for example xcopy....

on staging environment works, on production no...
12 years ago
I am trying to start some bat file from java code. On almost the same server (windows 2003 64 bit) which is STAGING environment, everything works fine, but on the Production environment, bat file is simple not started. Anybody has any idea (running out of it)?

Here is the code:


try {
log.info("Calling external command: ");
Process proc = Runtime.getRuntime().exec("cmd /C start D:\\start.bat");
proc.waitFor();
} catch (Exception e) {
log.error("Error:", e);
}

No exception is thrown.
12 years ago