Search code examples
javagradlejarlibgdx

Application from editor works fine, jar file freezes computer


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?


Solution

  • 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