I created a jar file for my (OpenGL) application using Intellij’s “build jar” option.
When I try to execute the jar file, it launches the application screen, with the proper application title and screen sizes.
However, the inside of the screen is all “garbled”: some parts are blank, others have lines and/or pixels.
Note that the application runs properly, when executed via Intellij.
Does anyone have any idea what might be the problem?
I tried sending the jar file to a friend, and he said that the same problem occurs in his computer. Could this be related to missing in our computers?
Does anyone know if I need to tweak some of the IDE’s options?
Is there a place in the file system where I can try to find an error-log-file which will help me debug this?
Thanks in advance.
I found a solution for this.
In Intellij IDEA 10.5, I went to: File -> Project Structure -> Artifacts -> Jar
and verified that there some “Available Elements” in the right side column.
One of those was my project, which had a sub “folder” for its “assets”. So I added these to the jar, using “Put into output directory”.
Then I rebuilt the jar file and attempted to execute it. This was sucessful.
I’m guessing the problem was related to missing “assets” (i.e. images). The previous .jar file did not contain those images and the new one does.
Thanks.