S
Stan
Hi,
I have an .exe which I am trying to run from a Servlet under Tomcat
using Runtime.exe(). The exe reads a file (currently mounted as a
network drive \\mynetworkedHost\directoryA) and writes a file to a
directory under Program files which is world writable.
When Tomcat is started as a user from a cmd shell the process executes
properly. When Tomcat is running as a service the process fails to run
without any useful feedback as to why.
Interestingly when running as a service I can run the command without
any arguements and it completes with a 0 exit code. It's only when I
give it args and it needs to process (read a file) and write output
that the exe fails when run under the tomcat service. This is on
Windows XP Sp1, java 1.3.1_09 and tomcat 4.1.
Things do work when the file it is reading is located locally on the
c: drive.
This appears to be a windows permissions issue with accessing a
networked drive. All works well if the Tomcat service is running as
Administrator and the local Administrator has the same password as the
remotely mounted file systems Administrator password. So this probably
isn't a Java/Tomcat specific issue but I thought I'd post this here
incase anyone else has seen it.
Thanks.
I have an .exe which I am trying to run from a Servlet under Tomcat
using Runtime.exe(). The exe reads a file (currently mounted as a
network drive \\mynetworkedHost\directoryA) and writes a file to a
directory under Program files which is world writable.
When Tomcat is started as a user from a cmd shell the process executes
properly. When Tomcat is running as a service the process fails to run
without any useful feedback as to why.
Interestingly when running as a service I can run the command without
any arguements and it completes with a 0 exit code. It's only when I
give it args and it needs to process (read a file) and write output
that the exe fails when run under the tomcat service. This is on
Windows XP Sp1, java 1.3.1_09 and tomcat 4.1.
Things do work when the file it is reading is located locally on the
c: drive.
This appears to be a windows permissions issue with accessing a
networked drive. All works well if the Tomcat service is running as
Administrator and the local Administrator has the same password as the
remotely mounted file systems Administrator password. So this probably
isn't a Java/Tomcat specific issue but I thought I'd post this here
incase anyone else has seen it.
Thanks.