I am trying to convert various xls files into csv. when I execute the following command in the terminal it works fine
libreoffice --headless --convert-to csv --outdir
/Data/edennis/ /Data/edennis/2013-10/*.xls
but when I try with runtime exec it does not.
Research I've done:
- According to this thread Java Runtime exec() behavior cannot execute system commands like echo, but libreoffice is not a system command, isn't it an executable program ?
- Java runtime execThis thread recommends to use processBuilder, but not sure if this is what I would need to do in my case.
- According to the Java Doc:
EXEC: Executes the specified string command in a separate process with the specified environment.