I've recently finished my first game on Java, and I wanted to export it to my desktop, but when I did, the window opens up but nothing is displayed in it. But when I run the game in Eclipse, everything works normally. Can anyone help me fix that?
Asked
Active
Viewed 46 times
0
-
Do you want to export it as a runnable Jar file? – Abhinav P Sep 01 '17 at 20:14
-
Is there any other way of exporting java files? @AbhinavP – B. David Sep 01 '17 at 20:35
-
Eclipse help has the steps here https://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftasks-37.htm – user641887 Sep 01 '17 at 20:39
-
Yes. You can create an exe file as well. Check out this answer https://stackoverflow.com/questions/3013506/creating-exe-for-my-java-application-in-eclipse?lq=1 – Abhinav P Sep 01 '17 at 20:44
-
Have you checked if everything required (also non-Java resources like images) is in the generated JAR file (which is a ZIP archive)? [Depending on the code](https://stackoverflow.com/q/3369794/6505250), some non-Java resources are required to be located outside of the JAR file. – howlger Sep 02 '17 at 11:21
-
Okay so I have done what written in your linked question and things went better, I don't have a blank screen anymore, but the game doesn't start and freezes on the first frame. Do you think you know what the problem is? Is there any way to see the console messages when I'm not in Eclipse? @howlger – B. David Sep 04 '17 at 16:54
-
Sorry, but I have no idea what causing the freezes. If you start your game from the command line, the console messages will also be printed to the command line (see [System.out](https://docs.oracle.com/javase/8/docs/api/java/lang/System.html#out)). – howlger Sep 04 '17 at 21:17
-
Thank you so much! I started the game from the command line and I fixed my problem thanks to you!! @howlger – B. David Sep 05 '17 at 18:03