Eclipse Jar problem. It really doesn't make sense.

Just look at these.

http://img94.imageshack.us/img94/7168/newbitmapimage3ay.png

Then,

http://img405.imageshack.us/img405/4232/newbitmapimagena.png

and then…

http://img705.imageshack.us/img705/9884/newbitmapimage2yl.png

Can anyone shed some light?

Open the JAR file in some a ZIP tool, preferably 7zip. Can you find edu/bgp/global/Game.class?

http://img823.imageshack.us/img823/9524/newbitmapimage2uk.png

Yeah.
lol. Didn’t know I could pop jars open with WinRAR though. Haha.

A JAR file is a ZIP file with a renamed extension :wink:

Ok now go back to the root, go to the “META-INF” folder and open the MANIFEST.MF file in a text editor.

EDIT: Why is Game.java in there too? O_o

“Manifest-Version: 1.0
Sealed: true
Main-Class: edu.bgp.global.Game”

Is what it said.

Huh, everything is fine with your JAR file. Could you send it to me? I’ll try it running it here. If it works for me, then your Java installation is messed up :S

Sent a PM.

I got a “Java Exception has occurred.” On the command prompt, it said it couldn’t find the Slick classes :stuck_out_tongue:

Of course, how could I forget. You have to edit the MANIFEST.MF file properly, follow these directions in the first bullet.

Thanks man!

Actually no, META-INF and META-INF/MANIFEST.MF have to be the first and second entries in the TOC or it’s not a valid jar file. Just in case anyone was thinking about using zip and renaming it in order to create a jar file. For reading though, yeah it’s a .zip

Created Zip File -> Create META-INF folder -> Create MANIFEST.MF -> add classes -> Rename to .JAR -> double click -> works for me :slight_smile:

I swear I read something about the restriction about META-INF in the zip index … maybe they dropped it in later versions. The jar utility still guarantees it’s the first entry though.