2 Solutions for Win7/win10 to open jar files

Source: Internet
Author: User

Under the win10. jar files can not open, through the Internet search, find solutions, record, the need for the brothers to see.

Solution 1:

Create a new text document, enter the content "Javaw-jar%1", and save it as a batch file, such as "Run.bat".

Right-click the. jar format file and choose the run.bat you want to open.

The jar will be able to run at this time ....

Solution 2:

Open the registry, start the-> run (or use the shortcut key win+r), enter regedit, determine

Edit registry: Hkey_classes_root\applications\javaw.exe\shell\open\command, modify the data value to [D:\Program files\java\jdk1.6.0_21\ Jre\bin\javaw.exe '-jar '%1 '] (in square brackets, just add a jar before "%1" of the original value).

Alternatively, open the registry under the HKEY_CLASSES_ROOT path. The jar directory is open, typically by default to the name of the compressed software you have installed, such as mine for HaoZip.exe. Change it to Jarflie click OK.

If the JDK environment is already configured: Press WIN+R, eject the Run window, then enter CMD, jump to the doc window to the directory where you want to open the jar file, and then enter Java-jar *.jar carriage to run

Select the default program:. jar file Right-click, open-> Select default program-> Browse, select JRE under Bin file Javaw.exe.



To resolve the Win7 system, the jar file cannot double-click the issue

Jar file Double-click run

Problem: You are using a Win7,java jar file with WinRAR Double-clicking opens the file and cannot run directly.

Workaround:

1, select default program: Right-click Jar Package, open-> Select default program-> Browse, select JRE under Bin file Javaw.exe ( For example, my javaw.exe is under D:\Program files\java\jre6\bin).

2, editing the registry: Hkey_classes_root\applications\javaw.exe\shell\open\command, modify the data value to "D:\Program files\java\ Jdk1.6.0_21\jre\bin\javaw.exe "-jar" "%1" (just add-jar to the original number). The

is done, and the jar file runs directly.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.