Sign in to follow this  
Aken H Bosch

[java] JAR Portability

Recommended Posts

Aken H Bosch    348
First, let me say this: I am new to this forum. Also, my first forum experience (ever) gave me an incorrect impression which I am still trying to correct (really quick response). Now: I have been making Java games for the past year almost. Since this summer (August 2006, approx) I have been working with the JAR file format. I can run them fine, but various people I have tried to show my games to have had difficulties running them. There are two situations/problems. One is this one person who was using Linux. I don't know, does Linux generally do JAR files correctly? The other is Windows (what I use); some people are getting "Could not find the main class. Program will exit." errors for no apparent reason. I can run it, and I can extract the manifest file, and I have verified that it is present and contains a main class. What could I be doing wrong? Also (question pertaining to where on the forum to put something, if anywhere), what about games that I have already made or done a lot on? Is there some sort of general board for posting accomplishments and projects? Or is this forum solely for people with questions and answers, not people with working stuff? In short, where (on this forum or elsewhere) can I showcase my stuff? Since this is pertinent, I will include the most recent JAR file I've created and the stuff that it goes with: http://www.esnips.com/doc/e2157da2-e83c-48f7-ab55-0031e053f509 I'm not posting the controls mainly because I don't know if this is the right place for it. If it is, I will go ahead.

Share this post


Link to post
Share on other sites
smc    292
Linux does jar files fine. On most Linux systems you would need to run it from the command line, or using a shell script.

Your manifest looks fine.

I could not run your game on XP.


Exception in thread "main" java.lang.IllegalArgumentException: Width (-1) and he
ight (-1) cannot be <= 0
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknow
n Source)
at java.awt.image.BufferedImage.<init>(Unknown Source)
at hardpoint2.SuperImage.<init>(SuperImage.java:31)
at hardpoint2.SuperImage.forName(SuperImage.java:61)
at hardpoint2.HP2.<init>(HP2.java:62)
at hardpoint2.HP2.main(HP2.java:190)



I executed with the command: java -jar HardPoint2.jar

Share this post


Link to post
Share on other sites
Aken H Bosch    348
I believe you may be missing some image files, or (more likely) if you have them they were not unzipped to the Images\ folder like they should have been.

Controls (I guess I will go ahead and post them):

UP = Accelerate
DOWN = Brakes
LEFT / RIGHT = Rotate
CTRL = Shoot
S = Afterburners (Extra speed while held)
J = Jump (Hold while over a gateway)
ENTER = Pause

Share this post


Link to post
Share on other sites
OrangyTang    1298
Quote:
Original post by Aken H Bosch
Also (question pertaining to where on the forum to put something, if anywhere), what about games that I have already made or done a lot on? Is there some sort of general board for posting accomplishments and projects? Or is this forum solely for people with questions and answers, not people with working stuff? In short, where (on this forum or elsewhere) can I showcase my stuff?

You can post it to the Your Annoucements forum, or you can sign up for GDNet+ and put your game on the Showcase.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this