Any hints? As process() works and opens winword, I prosume that the error does not come from my installation (Win10, Tomcat 9.0, BaseX 9 - war version). Starting Tomcat as admin does not change anything.
Just guessing: Maybe Tomcat servlets are run in a restricted environment? I just tried your example code with Jetty, and 'dir' was executed as expected. Could you try to launch 'basexhttp' and check if 'dir' yields any results?
Thanks in advance, Christian
PS: If you want to access files and directories with BaseX, the XQuery File Module is probably the best choice.