简体   繁体   English

如何在文件关联窗口8中指定-jar选项

[英]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. 我遇到了一个著名的问题,我找到了很多答案,但是都没有显示Windows8的方向,我找不到它。

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. 尽管我的Jar文件与Java Platform SE相关联,但双击Binary仍然无法执行该程序。我在此答案中找到了与该问题其他许多解决方案类似的解决方案。 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. 但是,在Windows8中,“文件夹”选项下没有“文件类型”选项卡,没有“高级”按钮和“用于执行操作的应用程序”文本字段。

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 NA.jar中没有主清单属性

as an error. 作为错误。 I have the package and class info in META-INF/MANIFEST.MF 我在META-INF / MANIFEST.MF中有软件包和类的信息

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 进入HKEY_CLASSES_ROOT \\ Applications \\ javaw

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM