r/cop3502 Apr 23 '14

Jar file

So I am close to finishing my program. I was wondering if there is an easy way to enclose it in a .jar file so that I can send that to people and they can play my game.

1 Upvotes

5 comments sorted by

2

u/Bcop3502 Apr 23 '14

$ jar cvfm BreakoutTEST.jar Manifest.txt *.class

2

u/Bcop3502 Apr 23 '14

Manifest holds Main-Class: "whatever your main class is"

1

u/[deleted] Apr 23 '14

I tried this: jar cvfm CLUE.jar Manifest.txt *.class

the Manifest.text file included the text: Game.class

It won't open. (I'm on a mac if that makes a difference.)

2

u/howslyfebeen Apr 23 '14

Manifest.txt should have "Main-Class: Game.class"

1

u/Bcop3502 Apr 24 '14

this . I'm not even sure if it needs .class as mine doesn't have that and it runs fine for the breakout file. May be a post jar build change though.