Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  Eclipse Jar problem. It really doesn't make sense.  (Read 381 times)
0 Members and 1 Guest are viewing this topic.
Offline SkyAphid

Full Member
**

Posts: 154
Medals: 1



« on: 2012-01-16 22:41:25 »

Just look at these.



Then,



and then...




Can anyone shed some light?

"God grant me the serenity, to accept the things I cannot change; courage to change the things I can; and wisdom to know the difference."
Offline ra4king

JGO Kernel
*****

Posts: 3153
Medals: 196


I'm the King!


« Reply #1 on: 2012-01-16 22:48:22 »

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

Offline SkyAphid

Full Member
**

Posts: 154
Medals: 1



« Reply #2 on: 2012-01-16 23:07:09 »



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

"God grant me the serenity, to accept the things I cannot change; courage to change the things I can; and wisdom to know the difference."
Games published by our own members! Go get 'em!
Offline ra4king

JGO Kernel
*****

Posts: 3153
Medals: 196


I'm the King!


« Reply #3 on: 2012-01-16 23:08:05 »

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

Offline SkyAphid

Full Member
**

Posts: 154
Medals: 1



« Reply #4 on: 2012-01-16 23:10:11 »

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

Is what it said.

"God grant me the serenity, to accept the things I cannot change; courage to change the things I can; and wisdom to know the difference."
Offline ra4king

JGO Kernel
*****

Posts: 3153
Medals: 196


I'm the King!


« Reply #5 on: 2012-01-16 23:11:19 »

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

Offline SkyAphid

Full Member
**

Posts: 154
Medals: 1



« Reply #6 on: 2012-01-16 23:17:22 »

Sent a PM.

"God grant me the serenity, to accept the things I cannot change; courage to change the things I can; and wisdom to know the difference."
Offline ra4king

JGO Kernel
*****

Posts: 3153
Medals: 196


I'm the King!


« Reply #7 on: 2012-01-16 23:21:28 »

I got a "Java Exception has occurred." On the command prompt, it said it couldn't find the Slick classes Tongue

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

Offline SkyAphid

Full Member
**

Posts: 154
Medals: 1



« Reply #8 on: 2012-01-16 23:22:49 »

Thanks man!

"God grant me the serenity, to accept the things I cannot change; courage to change the things I can; and wisdom to know the difference."
Offline sproingie

JGO Strike Force
***

Posts: 894
Medals: 55



« Reply #9 on: 2012-01-17 00:57:09 »

A JAR file is a ZIP file with a renamed extension Wink

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
Games published by our own members! Go get 'em!
Offline ra4king

JGO Kernel
*****

Posts: 3153
Medals: 196


I'm the King!


« Reply #10 on: 2012-01-17 01:11:05 »

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

Offline sproingie

JGO Strike Force
***

Posts: 894
Medals: 55



« Reply #11 on: 2012-01-17 01:19:23 »

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.
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.09 seconds with 20 queries.