Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (553)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Other people can't execute my JAR file?  (Read 988 times)
0 Members and 1 Guest are viewing this topic.
Offline Shane75776
« Posted 2011-12-05 18:00:33 »

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

Check out my Snipping Tool++ ! An advanced snippet/screenshot/text uploading tool! Meant to replace the windows snipping tool.

Check out Pixel Rain My most recent Swing based game!
Offline ReBirth
« Reply #1 - Posted 2011-12-06 00:41:31 »

Error of main class usually happens because manifest file problem.

Offline philfrei
« Reply #2 - Posted 2011-12-06 00:59:30 »

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.

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ReBirth
« Reply #3 - Posted 2011-12-06 01:21:17 »

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).

Offline Shane75776
« Reply #4 - Posted 2011-12-06 04:03:16 »

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!

Check out my Snipping Tool++ ! An advanced snippet/screenshot/text uploading tool! Meant to replace the windows snipping tool.

Check out Pixel Rain My most recent Swing based game!
Offline ReBirth
« Reply #5 - Posted 2011-12-06 10:13:21 »

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

Offline theagentd
« Reply #6 - Posted 2011-12-06 10:19:31 »

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?

Myomyomyo.
Offline ReBirth
« Reply #7 - Posted 2011-12-06 10:31:10 »

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.

Offline ra4king

JGO Kernel


Medals: 345
Projects: 2
Exp: 5 years


I'm the King!


« Reply #8 - Posted 2011-12-06 17:15:43 »

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?
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 Grin

Offline theagentd
« Reply #9 - Posted 2011-12-06 19:42:55 »

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?
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 Grin
Meh.

Myomyomyo.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (16 views)
2014-08-28 18:26:30

CopyableCougar4 (25 views)
2014-08-22 19:31:30

atombrot (38 views)
2014-08-19 09:29:53

Tekkerue (35 views)
2014-08-16 06:45:27

Tekkerue (32 views)
2014-08-16 06:22:17

Tekkerue (20 views)
2014-08-16 06:20:21

Tekkerue (31 views)
2014-08-16 06:12:11

Rayexar (66 views)
2014-08-11 02:49:23

BurntPizza (44 views)
2014-08-09 21:09:32

BurntPizza (34 views)
2014-08-08 02:01:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!