Something funny happening here. JNLP file is usually used for JWS. You mention you are double clicking, i.e. the jar file exists on your file system.
1) Can you post the contents of the manifest file (inside the jar)?
2) Also, can you try invoking the jar from the command line (java -jar JarFileName,jar) and provide us the full stack trace?

Maneesh Godbole wrote:Something funny happening here. JNLP file is usually used for JWS. You mention you are double clicking, i.e. the jar file exists on your file system.
1) Can you post the contents of the manifest file (inside the jar)?
2) Also, can you try invoking the jar from the command line (java -jar JarFileName,jar) and provide us the full stack trace?

manifest.txt file is
Main-Class: HelloWorld

from the command line
java -jar JarFileName.jar
the jar file opens and gives the required output

linus dale
Ranch Hand

Joined: Jul 01, 2009
Posts: 44

posted Jul 03, 2009 05:09:41

0

Maneesh Godbole wrote:Something funny happening here. JNLP file is usually used for JWS. You mention you are double clicking, i.e. the jar file exists on your file system.
1) Can you post the contents of the manifest file (inside the jar)?
2) Also, can you try invoking the jar from the command line (java -jar JarFileName,jar) and provide us the full stack trace?

for another program with 2 classes the jar file doesn't form at all
it is in a different folder jar1

It should be manifest.mf.
What you have posted indicates what happens when you build the jar, whereas you initially indicated you already had a jar which was not working.

Please provided answers to the two questions I asked previously. Until we get that information, we would not be able to help you.

linus dale
Ranch Hand

Joined: Jul 01, 2009
Posts: 44

posted Jul 03, 2009 10:26:00

0

Maneesh Godbole wrote:It should be manifest.mf.
What you have posted indicates what happens when you build the jar, whereas you initially indicated you already had a jar which was not working.

Please provided answers to the two questions I asked previously. Until we get that information, we would not be able to help you.

ok ,now it is working .I was opening it with jawaws instead of javaw in the bin folder
jar files open on double click,but ONLY for programs that have GUI output
manifest.txt as well as manifest.mf, it works for both

Why do jar files for simple(command line output) programs do not open on double click?

all jar files(GUI and non gui) open from command line now
>java -jar filename.jar