应用程序从编辑器正常工作,但JAR文件会冻结计算机。

huangapple go评论67阅读模式
英文:

Application from editor works fine, jar file freezes computer

问题

以下是翻译好的部分:

我使用libGDX制作了一个游戏,并从项目中制作了一个JAR文件。但是,当我尝试运行JAR文件时,整个计算机都会冻结,我甚至无法移动鼠标。在运行之前,我尝试打开任务管理器,也许可以在那里看到一些东西,但它只会弹出一秒钟然后消失。

LibGDX使用gradle来构建项目,我使用它来制作JAR文件。我按照libGDX网站上的指南制作了JAR文件:
https://libgdx.com/wiki/deployment/deploying-your-application
使用以下命令:

./gradlew desktop:dist

这是gradle文件的配置问题,还是我做错了什么?

英文:

I have made a game using libGDX and I made a JAR file from the project. However when I try to run the JAR file my whole computer freezes I can't even move my mouse. I tried to open task manager before I run it maybe I see something there but it only pops up for a second then disappears.

LibGDX uses gradle to build the project and I used it to make the JAR file. I made the JAR file by following the guide on the libGDX website:
https://libgdx.com/wiki/deployment/deploying-your-application
using the

./gradlew desktop:dist

command.

Is this a configuration issue in the gradle file or am I doing something wrong?

答案1

得分: 0

我尽力了尝试了一切我能想到的,但都没有帮助。
之后,我尝试在我的笔记本电脑上运行相同的应用程序,它可以运行。
对于以后遇到这个帖子的任何人,请先尝试在另一台计算机上运行它,或者请别人帮你试一下。

只是让你知道我尝试了什么,以及对我没有用的是:

  • 尝试不同的指南来从项目制作JAR文件
  • 基于这些指南对gradle进行更改,并尝试不同的组合,我阅读了每个命令的作用。
  • 创建一个没有任何内容的新的libGDX项目,然后尝试该JAR文件是否有效
  • 重新安装JRE、JDK
  • 尝试不同类型的JDK
  • 删除Intellij IDEA缓存
英文:

I have tried everything i could think of, but nothing helped.
After that i tried to run the same application on my laptop and it worked.
For anyone who later comes across this post, try to run it on another computer first, or ask someone to try it out for you.

Just so you know what i have tried and what didn't work for me:

  • Trying out different guides to make JAR from the project
  • Making changes to gradle, based on those guides and trying out different combinations, I read what each command does.
  • Making a new libGDX project with nothing in it then trying out if that JAR works
  • Reinstalling JRE, JDK
  • Trying out different types of JDKs
  • Deleting Intellij IDEA cache

huangapple
  • 本文由 发表于 2023年5月6日 20:01:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/76188753.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定