ExitValue of Windows OS Process returns always 128

T

tkonrath

Hi.

In our java webapp (jfdk 1.4.2 and Tomcat 4 on an Windows 2003 Server)
we have a class, which calls an externel programm as a OS process. But
the exit code is 128. Always !!! If we execute the command in die
Windows Command Line directly, everythink works fine.

The Tomcat runs as a service. Even if we create just a simple jsp page
with the following code:
<%

java.lang.Process dirProc =
java.lang.Runtime.getRuntime().exec("cmd /c Dir * > c:\
\dir_test.txt");


dirProc.waitFor();

out.write("" + dirProc.exitValue());
%>

we get 128 as exit code !!! and no file c:\dir_test.txt is created.

Can anyone help??? PLEASE!

Thanks

Thomas Konrath
 
T

tkonrath

Finally we solved the problem:

our Tomcat-Server runs as a service under Windows. Several other calls
of the external programm have just running of an timeout, but the
processes still exsists on the server. So after killing all hanging
processes through the task manager, everythink works fine.

It seem, that this return value is like the error message "Maximum
number of opend processes reached."

Thx,
Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,690
Members
48,796
Latest member
Greg L.

Latest Threads

Top