简体   繁体   English

在LIBGDX中生成可执行Jar文件

[英]Generate Executable Jar file in LIBGDX

To be clear, i know there is a thread like this on stackoverflow and he uses eclipse while I use Intellij. 明确地说,我知道在stackoverflow上有一个这样的线程,而当我使用Intellij时,他使用了eclipse。 Creating an executable jar in eclipse and intellij are different. 在eclipse和intellij中创建可执行jar有所不同。 So before downvote kindly consider my scenario. 因此,在拒绝投票之前,请考虑我的情况。 I created a simple java game using libgdx and want to export it in an executable jar. 我使用libgdx创建了一个简单的Java游戏,并希望将其导出到可执行jar中。 But before doing so, I experimented in creating a jar of the one in the tutorial video of official LIBGDX.This is the jar file Dload it here .. If you execute it opens then close again. 但是,在此之前,我尝试在官方LIBGDX的教程视频中创建一个jar罐。这是jar文件,请在此处加载它。如果执行,则将其打开,然后再次关闭。 But when i ran the project in intellij it runs without error. 但是,当我在intellij中运行该项目时,它运行无误。

This is the image i was expecting if i execute the jar file i created.. 这是我执行我创建的jar文件时所期望的图像。 在此处输入图片说明

What is wrong when i tried to create a jar file?? 当我尝试创建jar文件时怎么了? Anyone?? 任何人?? Thanks 谢谢

Just open your exported jar file like a zip archive and export your assets folder and libraries beside your jar file then test it again. 只需打开您的导出的jar文件(如zip存档),然后导出jar文件旁边的资产文件夹和库,然后再次进行测试即可。 Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM