cant create jar

(i would have placed this topic in the newless clubies, if it was about jarring a game, since its not i thought its more appropriate to place it in the off topic section)

i have been reading about how to create an executable jar file, i have read every single online tutorial plus a couple of chapters from my universities books but still cant do it
am i retarded or what

i do manage to create the jar file, which i guess means that the jar utility works, when i unzip to check the insides everything (class files + Manifest with the correct Main-class: attribute) is there

but when i double click it nothing happens
when i run the application from my IDE, it runs
i also downloaded a random jar from the web to see if the execution process has any problem but no, it executed properly after double clicking

so what might be the problem? should i read the documentation of the jar format in the sun site? its way too long and way too technical for me to understand (not the tutorial about how to use, the documentation of the jar format) and even if i did i am not so sure i would understand the inner workings of the format, and even if i did i am not so sure it would help

i’m gonna stop my for-no-good-reason writing spree now

all ideas are welcom

Based on your description it sounds like a problem with the manifest file. Is your main class in a package? Do you use outside libraries? Here is a simple manifest template I use.

Manifest-Version: 1.0
Main-Class: com.mysite.mygame.GameFrame
Class-Path: GameEngine.jar

no its not in a main class
i do not use outside libraries
its only for .class files and a gif
i created the manifest file
run the jar command
the jar was created
double clicking doesnt start the app

what is the Class-Path header for?
do i need it?
(all of my class files and gif and manifest lie in the same directory)

thank you for your answer

went to my university, and tried to create the jars i needed at the computer lab
they are working ok

so i guess there is something wrong with my computer

Try running the jar from the command line/terminal and see what output you get.
java -jar yourGame.jar

java installation damaged.

I have one just like that.

i am 99% sure that this is the case
i downloaded some code from the official Sun tutorials and tried to compile them, some imports didnt work (like java.nio.file.attribute)

thank you all for the help