Other people can't execute my JAR file?

So I made a game and packaged all of its resources in a jar file. I can place this jar file anywhere on my computer all by itself, double click it, and it will open up and
run just fine.

However, whenever I give this jar to anyone else, if they go to run it by “double clicking” they are given a main class now found error. But if they
run it from the command line with “java -jar AtomicBlocks.jar” it will run.

Is this an issue with how I made the jar or something? I am using eclipse to create a runnable jar file.

Here is the jar file link if you would like to test this for yourself, if it works then Hurray its not something on my end.

http://www.mediafire.com/?nk8chqvn57v8cjv

Error of main class usually happens because manifest file problem.

I ran as a command line and got the following error:
Exception in thread “main” java.lang.UnsupportedClassVersionError: AtomicBlocks : Unsupported major.minor version 51.0

A search on this error “Unsupported major.minor version 51.0” shows that it occurs when one tries to run a program compiled via a more advanced JDK. For example, since I have the latest Java 6, I’m guessing you compiled this via Java 7?

I’m not familiar enough with how Manifests work to know if versions are addressed there.

I think advanced jdk compile problem only appear when you use any special functions on it. For example, hello world compiled on java7 should have no prob on java6 run. Prob occurs when compiling java7, let’s say you use switch(string).

Well it seems its because i am using 1.7 and everyone else I know is on 1.6

so I set the jdk to 1.6 for this program and all seems to work fine now for everyone else.

Thanks!

Really? then I have a serious prob for my java4k submit now ;D

Sigh… Because upgrading Java is to tedious for people at the Java Gaming forum? Not only am I not allowed to use OpenGL 3.0 (it’s too new, it’s only like 5 years old), but I can’t even use the latest version of the API this whole forum is about?

The only reason why no two jdk on mine because i think it’s too mess. I just want classpath on my enviroment. I started new win installation and only pick one, which is ofc the new one. I though by not using its special function everything would work find.

Nobody said it’s not allowed. Do what you want, but if you want to distribute to the masses, you’ve gotta be mindful that it must work on the most number of computers possible. Please stop going all over the forum and complain about this.

Sorry for derailing this thread ;D

Meh.