当前位置: 动力学知识库 > 问答 > 编程问答 >

Launching external LWJGL Java application

问题描述:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: