Trying to run my engine as executable jar

Started by Martijn, August 23, 2014, 11:45:11

Previous topic - Next topic

Martijn

Hi guys,

I'm finally done with a workable beta version of my own engine written with LWJGL. The problem is I'm trying to export it as an runnable .jar (using both eclipse and jarsplice method) but a friend of mine cannot run the .jar. He says he gets an LauncherHelper.checkAndLoadMain error. On my system the jar opens fine (using cmd  java -jar engine.jar).

I've uploaded my jar on this site: http://www.filedropper.com/engine_1

Could somebody try and run it (maybe using the cmd method:    java -jar engine.jar)  and tell me if it works, or what error you get? And maybe on how to fix it?

Thanks in advance,
Martijn

quew8

I did run it for you, and your problem me thinks is that you compiled it with Java 8. You can't compile something with Java 8 and expect non-developers to be able to run it, the runtime hasn't been released yet.

Martijn

You're right, I compiled it with Java 7 now and it works. Thanks for the help.
It's a shame the JVM didn't give a proper error message.

Thanks.  :)

quew8

The JVM does give a "proper error message." It doesn't say "this code has been compiled with Java 8 whereas you're JRE is only Java 7" because the JRE has no way of knowing that. What it knows is that it could not parse the class files and so this is what it says. Exactly what a good error message does - give as detailed description of the error as is relevant. It can't also diagnose the error. That'll be the day us programmers are no longer needed.