The solution that the jar package cannot be run directly

If double-clicking the jar package can not run directly:
1. Find the path of the jre installed on your computer, right-click the javaw.exe property, copy the path C:\Program Files\Java\jre1.8.0_333\bin
insert image description here
insert image description here
2. Open Registry editor, it is recommended to search directly in the search box in the lower left corner of the computer, and press the shortcut key Ctrl+F to find it.
insert image description here
3. Enter javaw.exe in the search box and click Find.
insert image description here
4. Find Command in the directory, and double-click the default file on the right.
insert image description here
insert image description here
5. According to the address on your computer,
modify the data to " C:\Program Files\Java\jre1.8.0_333\bin \javaw.exe" -jar "%1" %*
only modify the bold part to your own address, Keep the rest unchanged, copy directly, and then confirm.
insert image description here
6. Find the jar package you want to run, right-click Properties, change the open method to javaw.exe found in the first step, and click Apply to complete. At this point, double-click the jar package to run the program directly.
insert image description here
This method originated from the blog of the predecessors, the original address: http://t.csdn.cn/69OHE

Guess you like

Origin blog.csdn.net/weixin_47678894/article/details/125466084