Search code examples
javajarwindows-8file-association

How to specify the -jar option in the file association windows 8


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


Solution

  • 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