0

I have a famous issue which I found many answers but none of them shows the direction for Windows8 and I cannot find it.

Although my Jar file is associated with Java Platform SE Binary double-clicking still does not execute the program.I found a solution for that in this answer similar to many other solutions about this issue. However, in Windows8 there is no File Types tab under Folder option to have the "Advanced" button and Application Used to Perform Action text field.

Where can I find that or what is the alternative?

Thank you

I also tried running it from Command Prompt:

 Java -jar NA.jar

and I am getting

no main manifest attribute, in NA.jar

as an error. I have the package and class info in META-INF/MANIFEST.MF

Mahsa
  • 1,502
  • 7
  • 18
  • 40
  • look if the program [Default Programs Editor](https://defaultprogramseditor.com/#download) still works in newer Windows version and edit here the file association. – magicandre1981 Oct 03 '17 at 06:13
  • Thanks, @magicandre1981 I already did that section and the program shows: "C:\Program Files\Java\jre1.8.0_141\bin\javaw.exe" -jar "%1" %* as program path but still my Jar is not executing... any ideas? – Mahsa Oct 03 '17 at 14:40
  • what error do you get? – Jurgen De Landsheer Oct 03 '17 at 14:50
  • I tried running my program by double-clicking on jar file. It doesn't do anything. I tried the command line: java -jar NA.jar and I got this error: "no main manifest attribute" I am looking into the following for that error: https://stackoverflow.com/a/9689877/3827280 – Mahsa Oct 03 '17 at 15:06
  • Does your .jar file contain a META-INF/MANIFEST.MF file, and does that file contain a Main-Class attribute? – VGR Oct 04 '17 at 00:43
  • Yes it does have it and I added package and main class to it following this : https://stackoverflow.com/a/9689877/3827280 – Mahsa Oct 04 '17 at 00:59

1 Answers1

1

I was able to fix it with adding this line:

     "C:\Program Files\Java\jre1.8.0_141\bin\javaw.exe" -jar "%1" %*

into HKEY_CLASSES_ROOT\Applications\javaw

Mahsa
  • 1,502
  • 7
  • 18
  • 40