In Tomcat, I have a REST app that works fine on the Mac. Yet, in windows (under Tomcat), trying to run a process as shown below returns null.
If I enter the parameters passed in the cmdArray at the command line on Windows, it works.
If I run the application, not using the Tomcat Manager (Tomcat started from the Service Manager, that is), but a local directory of Tomcat (separate from the Tomcat that runs from the service manager), the exec() also works.
Have worked on this for two days now and I have no idea how to fix this issue.
Should I install a new version of Tomcat Manager?
(the manager app that runs from Windows service manager)
The Runtime().exec() is simply failing to run.
I tried to connect to AWS over port 8000, but after having opened all the ports in AWS and in Windows, port 8000 is refused. (yet another challenge!)
It would help to see the command you're using. One possible gotcha is not to use absolute paths for everything - the executable as well as all files and/or directories that may be passed in as parameters.
You might consider using java.lang.ProcessBuilder instead of Runtime.exe.
Are the working and non-working cases both using the identical authorization/running under the identical user?
Can there be some working permissions issue due to a subtle difference?
Was any helpful error message subtly written into the Windows Error Logs somewhere?
RTFJD (the JavaDocs are your friends!) If you haven't read them in a long time, then RRTFJD (they might have changed!)