I want to launch a lwjgl based application from another java application. I am trying to achieve this by running a command. Using this code:
p = Runtime.getRuntime().exec(command);
int exitCode = p.waitFor();
java -Djava.library.path="natives/macosx/" -jar test.jar is the command I'm trying to execute. The other jar runs its main method and exits with code 1. This command works perfectly when running it directly inside the terminal, or when creating a .sh file and including this in my application. My research resulted in this question. My idea was to launch it in separate VM as mentioned in the comment. Sadly it was not answered how to do this.