I need to execute an external program from Java (to convert a fodt file to pdf using libreoffice, it so happens) I know the precise command-line I need for
I have tried every solution proposed in this thread and it does not work.
In my app (java webapp using TOMCAT in linux) it only works to create a shell script and execute the script. But you have to put the absolute path in the script, if not, it does not work ($HOME does not work). Besides, you can pass it arguments.
Example:
Runtime.getRuntime().exec("/home/user/myscript.sh param1");