All right, so i have exported a game i have created to an runnable jar file as i have many times before. Earlier i haven't had a problem like this, the last time i exported it was on friday, and now when the last version is finished and i export it, the window just closes when i have gone trough a few screens, flash, credits and menu, no error is given if i run it trough commandline. The game works fine if i run it trough eclipse. I have checked the buildpath and the asset folder is there and all. I have opened the jar with winrar and checked to see that all images are there, and they are. I have tried both to extract and package the libraries. I am at a total loss....

I looked around and only could find one thread on this, and that was an error with a static filepath.

I really need this fixed since it's supposed to be turned in on tuesday. :/

I have run it trough the console on windows, but i get no error showing up. I have tried added the try and catch on several different positions in the code, invoking the switch to GameScreen, and on the constructor in GameScreen. I also tried adding a few System.out.printlns here and there and none of them showed up.

I have tried both extracting and packaging the libraries, nothing works. If it would have been a libraries problem, the first screens wouldnt work either, since they use tween stuff and the libraries associated with that. The only things i have added since friday are more images, which i have checked, they are there in the jar. Some code, and a new death/highscore screen. The code are simple loops to print the images up.

*edit* I tried to comment out everything but the camera and map generation from the gamescreen and it still doesnt run.

I have tried both extracting and packaging the libraries, nothing works. If it would have been a libraries problem, the first screens wouldnt work either, since they use tween stuff and the libraries associated with that. The only things i have added since friday are more images, which i have checked, they are there in the jar. Some code, and a new death/highscore screen. The code are simple loops to print the images up.

*edit* I tried to comment out everything but the camera and map generation from the gamescreen and it still doesnt run.

There is nothing in the GameScreen dispose, the only one that got is the MainMenu screen, which also uses an atlas. But nothing else does(neither do they use and atlas), havent gotten into learning that or the assetmanager yet. Anyways, i have skipped all the screens in front of gamescreen and go directly to the gamescreen when the game launches, and the game crashes. So i dont think that has anything to do with it.

There is nothing new in there, i don't remember the last time i edited anything in show().

Hide has nothing, i even commented out the call to the empty dispose. Resize is just changing the viewport and such, but isnt called since the window isnt resizable anymore.(i tried making it resizable again, but it crashes anyway.)

The only conceivable reason why it doesn't work is because your resources are messing up. I've barely used LibGDX though. Are LibGDX games just export and run? Or do you have to run them through JarSplicer first?

I am working my way slowly trough the game uncommenting stuff as i extract the game from a working state to a crashing state. I think its somewhere in the entity / player class. But since i dont get an error i have no idea.

Yea, just export and run. The assets are there in the .jar file, so i am baffled.

Compilers only do what you tell it to do. If you get in the habit of not typing everything exactly correct, then how can you expect the program to know what to do? Eclipse is actually creating bad habits, yes, but only if you let yourself slip into them.

If there is not an error printing out there most likely is not an error occurring, otherwise something would be printed out. One of the harder things in programming (sometimes easiest thing) is to accept that you have done something wrong and it is not a bug in the software you are using, but rather in the code you wrote.

Its a bug in the software if it doesn't tell me that there is an error.It's eclipse on windows, running a jar on windows. They should give the same errors. If not, Eclipse has given a false compiler that gives people false input.

Its a bug in the software if it doesn't tell me that there is an error.It's eclipse on windows, running a jar on windows. They should give the same errors. If not, Eclipse has given a false compiler that gives people false input.

If you follow a map(Eclipse), and it creates a bridge where it thinks it should be a bridge, but it is'nt actualy built. So in reality(running the jar) when you come to that place, there is no bridge. That is a fault on the map, not the reader.

If your Program makes so much I/O , imagine if the IDE would keep checking one by one everytime you opened it.Would take ages, especially if you are , supposedly, making a crysis 3 - Clone, for example.

It doesnt make sense.Its your responsability for do that. The IDE is to help, not do it for yourself.

The IDE isn't supposed to be able to run with a crash in the code. And if the IDE goes around this crash, knowing its there, it should tell about it. It makes total and complete sense, thinking anything else is f*cked up.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org