Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 eclipse v.4.2.2,我正在尝试为我的项目创建一个可执行的 .jar 文件。 我尝试过简单地使用导出选项,但是当我这样做时它会显示错误,因为它找不到 openGL。我确实选中了“将所需库提取到生成的 JAR”框。 我做错了什么或我没有做什么?
我建议使用JarSplice,它非常简单高效。
.首先使用 Eclipse 将您的 lwjgl 项目导出为常规 jar。
.Second 使用JarSplice并添加所有必要的 jar。(您的游戏和所有使用的库)。
.第三添加所需的本地人。
.Fourth 添加主类路径,这example.main.MainClass取决于您的包层次结构。
example.main.MainClass
.Fifth 创建一个胖罐子。
.(可选)创建 Windows .exe、Linux .sh 或 Mac .app
我希望这有帮助。