-1

This is the hierarchy of files:

desktop->Tic(folder)->contains: Game.jar ; Game (extracted folder)

Game (folder) has all .class files.

Game.jar has META-INF->MANIFEST.MF->has Main-Class: Game.Main

So, how do I run the .jar file?

I looked at others' questions but couldn't figure out.

Thank you.

MadProgrammer
  • 343,457
  • 22
  • 230
  • 366
Sam
  • 1
  • 1

1 Answers1

1

If you have a manifest.mf file in Game.jar which points out Main-Class, you can run Game.jar by

java -jar Game.jar

or double click it on your desktop!

Another way to run Game.jar is

java -classpath Game.jar Game.Main

which does NOT require that the menifest.mf file exists in Game.jar.

nicky_zs
  • 3,633
  • 1
  • 18
  • 26