I need to exec an external application from a CUBA screen. Is it possible?
If I use java code
Runtime rs = Runtime.getRuntime();
it works only during my test in develop mode. But if I deploy the WAR file and try to run it in Apache, it doesn’t work.
So I need to know if it is possible to run an application and, if so, what is the solution.
Thanks in advance.
Runtime.exec() should work fine even inside of Apache.
If you get errors, then those need to be investigated and solved.
I would also recommend to use GitHub - apache/commons-exec: Apache Commons Exec library, which is a wrapper around Runtime.exec and has more convenient API.
thanks for your reply. Runtime doesn’t work and i don’t see any error or exception.
Simply the program run by the exec command doesn’t start (for example Notepad).
Anyway, even if it works, in this way i can run an application client side or server side?