My game is obviously built off of the Slick2D library. It almost always runs on all computers that have Java installed without any problems. A couple of my friends have complained about it not even starting up, though. In some cases, the AppGameContainer opens up for a few seconds, and immediately closes. In other cases, the jar doesn’t even run at all! I’ve tried outputting all error messages to a log file by writing:
try
{
PrintStream outie = new PrintStream(new FileOutputStream(“log.txt”));
System.setErr(outie);
}
catch (FileNotFoundException e1)
{
e1.printStackTrace();
}
This code writes all output to a log file that I specify. This technique works on my machine when I purposefully write idiot code, but I can’t seem to get my program to write to the log file on other people’s computers.
I once tried converting the jar to an exe (Don’t yell at me for doing this…) and tried to run it on my friend’s computer. The log file wasn’t written to, but a command prompt that always was loaded along side it outputted this right before fading away. I managed to print screen it before it disappeared…
The message is cryptic, though. I tried searching through the Slick2D library to narrow in on the issue, but the line numbers didn’t always match up with the error message.
I would also like to point out that the jar’s and exe’s behavior were the same aside for the fact that the exe had a command prompt alongside it.
Anyway, has anyone ever seen an error message like this? Is there any way to guarantee that my game will be compatible on other people’s computers?