How to open jar file windows

How to open a jar file

To open a jar file in Windows, you must have the Java Runtime Environment installed. Alternatively, you can use decompression software, such as an unzip utility, to view the files in the jar archive.

To run the file (Java Runtime Environment)

To run the jar file, you need to download and install the Java Runtime Environment (if you do not have it already) from the link below.

Once downloaded, you can run any jar file by double clicking the file name. Keep in mind that this only works if the jar file to be opened is executable. If it’s not executable, you can view files within it instead.

If double-clicking the jar file does not result in the file being run, it’s likely not an executable file and cannot run in this manner. Read the next section on how to view the contents of the jar file.

If the jar file opens using an archive program, such as WinRAR or 7-Zip, and you want Java to open it instead, follow the instructions below. (The jar file must contain executable Java code for these steps to work.)

  1. Right-click the file and select Open With.
  2. In the Open With window, click the Browse button to open the File Explorer window.
  3. You need to find the Java executable file (java.exe file) on your computer hard drive. It is often located in the «Program Files\Java» or «Program Files (x86)\Java» folder, within a possible subfolder below the Java folder. Once you find the file, select it and click OK.

To view the file (decompression)

To view individual files in a non-executable jar file, you can obtain compression/decompression software that works with jar files. We recommend using either 7-Zip or WinRAR.

Once you have installed this software, run the software, open the jar file, and extract the files contained in it. Once the files are extracted, you can view the individual files by double clicking them. Many of those files are probably text files, but others may require additional software to view them.

If the jar file defaults to be opened with an archive program, such as WinRAR or 7-Zip, you can change the default program. To change the default program that opens jar files, right-click the jar file, select Open With, then Choose default program. In the Open With window, click the Browse button to open the File Explorer window. You need to find the executable file (.exe file) for the software program you want to set as the default program to open the jar file.

How to Run .JAR Files on Windows 10

If you find yourself unable to open .jar files on Windows 10, it is likely due to one of the following problems:

*The Java Run-Time Environment is not properly set to run .jar files
*Windows Registry is not calling JRE (Java Runtime Environment) properly

Luckily there are a couple of easy solutions for fixing this. What happens for most people is that when trying to open a .jar file, Windows will typically ask what program you want to use to run the program. Of course, most people would simply choose the Java.exe, but this has the problem of stripping –jar from the program’s execution path. Basically you cannot set the required complex command to open .jar files by using “Open With…” in Windows 10.

Читайте также:  Linux вывод команды ping

So what will normally happen is that you’ll associate the .jar file to open with java.exe, you double-click on the executable .jar, and a command prompt window will open for a split second and close, and the program does not launch.

What we need to do is re-associate the .jar file with the Java binary.

  1. Make sure you are updated with the latest Java Runtime Environment.
  2. Navigate to your Java installation folder, go inside the /bin/ folder, right-click on Java.exe and set it to “Run as Administrator”.
  3. Press Windows + X keys and select “Command Prompt (Admin)” or Powershell (Admin) and type cmd
  4. Type the following commands into the prompt (replace the C:\Program Files\etc with your actual Java installation folder, for example, C:\Program Files (x86)\Java\jre1.8.0_131\bin\java.exe):

ftype jarfileterm=cmd /s /k “”C:\Program Files\Java\jre7\bin\java.exe” -jar “%1″ %*”
assoc .jar=jarfileterm

Or if you want the command prompt to stay open after launching the .jar file (for debugging purposes)

ftype jarfileterm=cmd /s /k “”C:\Program Files\Java\jre7\bin\java.exe” -jar “%1″ %*”
assoc .jar=jarfileterm

Now try to launch the .jar file. Depending on which of the steps above you took, the java executable should either launch or launch with a persistent command prompt behind it (which will fill up with Java calls from the app, useful for debugging purposes).

However, if the steps did not work, we will need to tweak your registry.

  1. Right-click on your Start button and do a search for “regedit”, then open it.
  2. Now expand the HKEY_CLASSES_ROOT folder, and scroll down until you find the folders “jar_auto_file” and “jarfileterm”.
  3. Expand to the following path
  4. You will see a key named “Default”. Right-click on “Default” and choose “Modify”.
  5. Now in the “Value data” box, paste the ftype command you entered earlier in the command prompt, so it looks like the screenshot below, and press OK.
  6. Now do the same thing for the jarfileterm folder (expand jarfileterm >Shell >Open >Comand).
  7. Now exit regedit and launch your .jar file, it should open properly now!

Разархивация и запуск файлов JAR

JAR (Java Archive File) – формат архива, в котором хранятся элементы программы, написанной на языке Java. Чаще всего файлы с таким расширением являются мобильными играми и приложениями. На компьютере можно просмотреть содержимое такого архива и/или попытаться запустить JAR как приложение.

Способы открытия JAR-архива

Для начала рассмотрим несколько программ для открытия архива JAR. Так можно убедиться, что в нём содержится всё необходимое для запуска этого приложения, а также внести требуемые изменения.

Способ 1: WinRAR

Когда речь заходит об архивах, большинству пользователей приходит на ум программа WinRAR. Для открытия файла JAR она отлично подходит.

    Разверните вкладку «Файл» и нажмите «Открыть архив» (Ctrl+O).

Перейдите в место хранения JAR, выделите этот файл и нажмите кнопку «Открыть».

Обратите внимание на наличие папки «META-INF» и файла «MANIFEST.MF», который должен храниться в ней. Это позволит реализовать файл JAR в качестве исполняемого.

Найти и открыть нужный архив можно и через встроенный обозреватель файлов WinRAR.

Читайте также:  Антивирус для файловых серверов windows

Если с содержимым архива планируется дальнейшая работа, то потребуется разархивация.

Способ 2: 7-Zip

Поддержка расширения JAR предусмотрена и в архиваторе 7-Zip.

    Нужный архив можно найти прямо в окне программы. Кликните по нему правой кнопкой и нажмите «Открыть».

Содержимое JAR будет доступно для просмотра и редактирования.

Способ 3: Total Commander

Альтернативой упомянутым программам может стать файловый менеджер Total Commander. Т.к. его функционал включает работу с архивами, открыть JAR-файл будет несложно.

  1. Укажите диск, где расположен JAR.
  2. Перейдите в директорию с архивом и дважды кликните по нему.

Файлы архива будут доступны для просмотра.

Способы запуска JAR на компьютере

При необходимости запустить приложение или игру JAR понадобится один из специальных эмуляторов.

Способ 1: KEmulator

Программа KEmulator – это продвинутый Java-эмулятор, позволяющий произвести настройку всевозможных параметров запуска приложения.

    Нажмите «Файл» и выберите пункт «Загрузить jar».

Найдите и откройте нужный JAR.

Или перенесите этот файл окно программы.

Через некоторое время приложение будет запущено. В нашем случае это мобильная версия Opera Mini.

На мобильных телефонах управление осуществлялось с помощью клавиатуры. В KEmulator можно включить её виртуальный аналог: нажмите «Справка» и выберите пункт «Клавиатура».

Выглядеть это будет так:

При желании в настройках программы Вы сможете задать соответствия клавиш телефона клавишам компьютера.

Обратите внимание, что в папке с JAR появится файл «kemulator.cfg», в котором прописаны параметры работы этого приложения. Если его удалить, то все настройки и сохранения (если речь идёт об игре) удалятся.

Способ 2: MidpX

Программа MidpX нет так функциональна, как KEmulator, но со своей задачей справляется.

После установки все файлы JAR будут ассоциироваться с MidpX. Это можно понять по изменившейся иконке:

Дважды кликните по ней и приложение будет запущено. При этом виртуальная клавиатура уже интегрирована в интерфейс программы, однако настроить управление с клавиатуры ПК тут нельзя.

Способ 3: Sjboy Emulator

Ещё один простой вариант для запуска JAR – это Sjboy Emulator. Главная его особенность заключается в возможности выбора скинов.

  1. Откройте контекстное меню JAR-файла.
  2. Наведите курсор на «Открыть с помощью».
  3. Выберите пункт «Open With SjBoy Emulator».

Клавиатура тут также интегрирована.

Итак, мы выяснили, что JAR можно открыть не только как обычный архив, но и запустить на компьютере через Java-эмулятор. В последнем случае удобнее всего использовать KEmulator, хотя и другие варианты тоже имеют свои преимущества, например, возможность изменять оформление окна.

How to run a JAR file on Windows 10 [QUICK GUIDE]

  • To run a JAR file on your Windows 10 device you certainly need to have Jave installed.
  • You’ll find below a path to the latest Java version in case you need it.
  • Then, you can find JAR file openers or executors, and we recommend some.
  • Using Command Prompt is also a handy solution if you don’t want to install third-party tools.

A JAR file is a Java archive package format that might include a Java program within it. While you can extract JARs with archive software such as 7zip, you can’t run a pure Java JAR app as you would with other programs in Windows.

Since that’s the case, we’ll cover how you can run a pure Java app JAR file in Windows.

How can I run a JAR file on Windows 10?

1. Add Java to Windows

The crucial thing you need upfront is to have Java installed. Without it, Java apps aren’t going to run in Windows. This is how you can install or update Java in Windows 10:

  • First, open Command Prompt(Admin) by pressing the Win key + R keyboard combination and entering cmd in the box.
  • Next, input java -version in the Command Prompt and press Enter. It will then provide further details on your Java version as below.

  • The current version of Java is Version 8 Update 131. If you don’t have Java or the most up-to-date version, you can add it for free.
  • Run through the Java setup wizard. Then, open your browser to verify that the program is working.

2. Download a JAR file opener

You can open JAR files and hundreds of different formats with a single application. File Viewer Plus is a universal file viewer for Windows that can open and display over 300 different file types.

The new updated version has a plethora of features that will save you big time on opening, viewing, or editing files.

File Viewer Plus supports the most popular text, audio or video file type, as well as archive, source code or web files.

File Viewer Plus

3. Use Java(TM) Platform SE binary

  1. Open the File Explorer and the folder that includes the file you need to run.
  2. You should right-click the JAR file and select Open with from the context menu.
  3. Click Choose another app and then select to open it with Java(TM) Platform SE binary.
  4. Click the Always use this app to open JAR files check box.
  5. Press the OK button to close the menu.
  6. Now you can run the selected JAR, and all other JARfiles will also be associated with Java.

4. Run a JAR file from the Windows Command Prompt

  1. Press the Win key + X hotkey and select Command Prompt (Admin) to open it as administrator.
  2. Then input the following command (replacing the example with the actual path of the file you need to run) and press Enter: java -jar c:pathtojarfile.jar
  3. Alternatively, you can open the folder that includes the JAR in the Command Prompt first by entering cd / followed by the directory. Then, you can input java -jar file.jar without the folder path.

That will open the executable JAR file so long as it contains a manifest file to specify the application’s entry point. (The developers should have already included that in the archive.)

If you develop your own Java programs, you’ll need to convert the JAR to an executable format.

5. Add a third-party JAR executor to Windows

There are also executor programs for Windows that enable you to run JAR files the same as any other program . Jarx is one of them and you can add it to Windows by clicking Jarx-1.2-installer.exe on this page.

Click the jarx .exe to run the software, which doesn’t really have a GUI as such (except an About jarx window). Then you can double-click the JAR files to run them in Windows.

If you’re having trouble accessing the JAR file or you get some kind of an error, take a look at this nifty guide to finding some great fixes.

With all this, you can now run JAR files in Windows. If you need to fix a JAR file that isn’t opening, check out this Windows Report guide.

If you have any other suggestions or questions, leave them in the comments section below and we’ll be sure to take a look.

Читайте также:  Opening windows task manager
Оцените статью