Greetings,
I am working on a
jsp application and at some point I need to execute a terminal command within
java code.
Although the exact command works in terminal(osx), it returns a application specific error when I try it in java. (I interpreted this as I can reach the .jar file and execute it yet there's somehow a problem while passing the parameters).
I tried both runtime.exec() and processbuilder.start() options.
Any help will be highly appreciated
Below is the command and the code I have been working on:
command:
java code (both with processbuilder and runtime.exec())