How to run the jar file in windows

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.

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!

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.
Читайте также:  Как сделать экран теплее windows 10

  • 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.

How to open or run a JAR file on Windows

JAR files are like EXE files except that they need a Java framework to run. Imagine them as EXE files on Windows which you can double click to launch the program. When you run an EXE file, it uses Windows OS support. Similarly, when you run JAR files, you need the help of Java Framework to open. When we say open JAR file, we are not opening the file like an archive file, but we are executing it. In this post, I will share how to open or run a JAR file on Windows 10.

While Archiver tools like 7-Zip can extract content from JAR files, but doing that is pointless – we need to execute the files just as we run the EXE files.

How to run a JAR file in Windows 10

Since Java files can’t run on Windows on its own, you need to install the Java Framework or what is popularly called as Java. That said, Java files can be dependent on a particular version of Java. You will need to take care of that as well.

  1. Download and install Java.
  2. Set System path
  3. Run the JAVA file
  4. Set Java file association.
Читайте также:  Linux как вывести содержимое каталога

1] Download and install Java Framework

To run a JAR file on Windows, you need to install Java on your system. Go to Java Download Page, and install it. The default will install the latest version only. However, if your JAR file needs a different version of Java, you can download it from here.

Sometimes, an existing older version of Java can cause an issue. So, if you are facing such a problem, make sure to remove the older version first. Use the official Java Remover tool to get rid of it. Then install the latest version.

2] Set System Path for Java

Next, you need to set the JAVA_HOME path. It makes sure that any JAVA file you run can find the necessary libraries for the program. You can also use the command line to echo the Java path to figure out if it is correct.

3] Run a Java or JAR file

Now when you double click on the JAR file, it will automatically run like how EXE files execute. If there is a problem with version, the file should inform you.

If you have a JAR file which is not running on its own, then you can use java JDK to run it. Open Command Prompt, and type java -jar name_of_jar_file.jar. It will execute the JAR file automatically.

4] Set the Java or JAR file association

The last step is to establish a file association with Java run time. It will make sure that every time you run, you are not asked to select a program which can execute it.

  1. Shift + Right-click on the file, and select Open with option.
  2. Select ‘Choose another app.’
  3. If Java(TM) Platform SE binary is not in your list, scroll, and then click on More Apps.
  4. And then choose Select app from the computer.
  5. You should see ‘Java(TM) Platform SE binary’ listed in this context menu but don’t select it.
  6. Locate the file which can run the JAVA or JAR file which is available in the path we suggested above.
  7. Make sure to check the box which says, “Always use this program.”

Once done, all future JAR files will automatically open with Java run time library. You should see the Java icon for all of these files.

We hope these tips where easy to understand, and were of help to open or run a Java file on Windows 10.

How To Run A JAR File On Windows

Apr 10, 2017
Comment

Windows apps are mainly packaged as installers or executable files. An app installer has the MSI extension and an executable file has the EXE extension. At times, a developer may choose to zip an EXE file. This is done because browsers will block an EXE from downloading thinking it is malicious. Similarly, some email services and clients may not let users attach or download an EXE file. Windows users are therefore, used to extracting an EXE from a zipped folder in order to run it. While normal, this can be confusing if you’ve downloaded a JAR file. The JAR file will be associated with the 7zip or Winzip apps. The archive app will be able to extract the JAR file but there isn’t going to be anything in it that you can run. Here’s how you can run a JAR file on Windows.

What Is A JAR File?

A JAR file is a Java file. JAR is the file extension for Java files. Apps are built to run on the JAVA framework. Minecraft (the desktop version) is one common example of an app that requires Java installed on your system to run. Minecraft itself is packaged as an EXE file so you never have to run a JAR file with it.

The JAR file is a pure Java app that hasn’t been packaged into an EXE. Windows alone cannot run it.

Install Java

In order to run a JAR file on Windows, you need to install Java on your system. Check if the file you want to run requires a specific version of Java to run. If the developer hasn’t specified a version, download and install the latest version of Java on your system.

Run A JAR File

The file association of the JAR file will not change once you’ve installed Java. Go to the folder the JAR file is in. Right-click it and go to the ‘Open with’ option. Select ‘Choose another app’. You will see ‘Java(TM) Platform SE binary’ listed in this context menu but don’t select it. Select the ‘Choose another app’ option.

Читайте также:  Creative sb live 5 1 digital sb0220 драйвер windows 10

The ‘How do you want to open this file?’ menu will pop up. Select ‘Java(TM) Platform SE binary’ and check the ‘Always use this app to open .jar files’ option at the bottom. Click ‘Ok’.

The file will now open. All future JAR files that you download will now be associated with Java. You will only have to double click a JAR file to run it. The next JAR file you download will not be associated with an archive app. Instead, the file’s icon will be the official Java file icon.

4 Comments

Have you at any time made too much money without trying to sell a thing or perhaps left out engaging in any of the mlm kind of job and one never has to make investments anything at all. Let me discuss a task wherein pretty much all specialty tools will be alloted to you and additionally it truly is an easy and also very simple gig. No need to launch your websites for example., all are generally provided to you free of charge. Customers will definitely take a look at your site so you will immediately get paid for that. It really is as easy as that. Now I am creating some huge cash from a home office because of this work just like 20000 dollars month to month or more if you also genuinely wish to receive like this so therefore follow these specific relatively simple instructions by exploring this web page >>>>> ADULTADDA.NET/2Yw

Have you made some huge cash without trying to sell things or rather left out working at any specific referral marketing sort of business while not having to make an investments any-thing. I wish to tell you a task whereby all of the software is generally given to you and also its quite a simple in addition to so easy work. No need to setup your personal websites and etc., everything are going to be provided to you at absolutely no cost. People definitely will log in your website therefore you will get remunerated for that. It really is as simple as that. I’m taking home a substantial amount of money from home through this project exactly like 20000 dollars month-to-month and more if you might actually want to take home money like this so therefore follow all these easy to understand tips by viewing this internet site >>>>> OLAURL.COM/15cp9

Have you in any case attained a ton of money without reselling a thing and even left out spending time on any direct sales kind of work and not having to make investments anything at all. I wish to discuss a project whereby every ways are generally presented to you and as a consequence its a very easy in addition to quite simple venture. Its not necessary to make your very own domain names and all that., almost all are generally made available to you free. Everyone will take a look at your web blog and you are able to get remunerated for that. Its as easy as that. Now I am creating large sums of money at home using this task such as 20 thousand bucks month to month and sometimes more just in case you might actually want to make money same as that then follow these specific incredibly easy information by viewing this web-site >>>>> SHRTY.LINK/YqgLBM

Have you ever profited big profits without selling things and also without carrying out any specific mlm marketing sort of job without having to invest anything. I want to talk about a work in which every tools is definitely presented to you and consequently its a very simple and also not hard job. Without requiring to design your personal domains and so on., all is going to be made available to you with on cost. Anyone will browse the website so you will get money for that. It is actually as simple as that. I’m creating large sums of money at home out of this job such as $20000 once a month or higher and if also you wish to earn same as that so therefore follow these very simple facts by seeing this web-site >>>>> URL4.UK/ZpK9M

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Оцените статью