- On Windows |
- On Mac |
- Q&A |
- Tips |
- Warnings
This article was co-authored by wikiHow staff writer, Jack Lloyd. Jack Lloyd is a Technology Writer and Editor for wikiHow. He has over two years of experience writing and editing technology-related articles. He is technology enthusiast and an English teacher.
This article has been viewed 2,132,912 times.
Learn more...
This wikiHow teaches you how to open and run executable JAR files on a Windows or Mac computer. JAR (Java Archive) files contain data to be used with the Java program. Most JAR files are simply containers for data that another program needs to run with Java; therefore you cannot run these files and nothing will happen when you double-click them. Similarly, most executable JAR files are downloaded as installation files to install applications or programs. Therefore, you should double check that you have the right JAR file designed for your operating system if you are having problems opening the file.
Steps
On Windows
-
1Install Java on your computer if it isn't installed. You can't run JAR files without Java installed on your computer. If you don't already have Java installed, go to Java's website at https://www.java.com/en/download/ and click the Free Java Download button below the latest version of Java, then install Java once it downloads.
- You may have to restart your computer for Java to be fully implemented.
-
2Double-click the JAR file. If it's executable and you have Java installed, it should open. If it doesn't open, proceed to the next step.
- You may see a pop-up window asking which program you want to use to open the file. If so, click Java(TM) and then click OK.
Advertisement -
3Make sure your JAR file is an executable file. JAR files that you download in order to set up programs are different from "library" JAR files, which store data that a program running Java can use. Since they don't have interfaces like executable JAR files, you cannot run non-executable JAR files.
- For example, many of the JAR files in a program's data folders are not executable files.
- If you downloaded your JAR file from online, make sure you clicked the Windows version of the file rather than the Mac version.
-
4
-
5Double-click your JAR file again. If it doesn't open this time, the file you're trying to open isn't executable and thus cannot be "run" in the traditional sense.
On Mac
-
1Install Java on your computer if it isn't installed. You can't run JAR files without Java installed on your computer. If you don't already have Java installed, go to Java's website at https://www.java.com/en/download/ and click the Download button below the latest version of Java, then install Java once it downloads.
- When installing a non-Apple file on Mac, you may have to first click OK on the warning, click the Apple menu, click System Preferences, click Security & Privacy, unlock the menu, click Open Anyway next to the file's name, and then click Open when prompted before you can install the file.
-
2Try double-clicking your JAR file. If it's executable and you have Java installed, it should open. If double-clicking the file doesn't open it, proceed to the next step.
-
3Make sure your JAR file is an executable file. JAR files that you download in order to set up programs are different from "library" JAR files, which store data that a program running Java can use. Since they don't have interfaces like executable JAR files, you cannot run non-executable JAR files.
- For example, many of the JAR files in a program's data folders are not executable files.
- If you downloaded your JAR file from online, make sure you downloaded the Mac version and not another operating system's version.
-
4
-
5Double-click your JAR file again. If it doesn't open this time, the file you're trying to open isn't executable and thus cannot be "run" in the traditional sense.
Community Q&A
-
QuestionHow can I download multiple .jar files while playing Minecraft?Community AnswerYou just download them. Minecraft won't affect it unless your computer is really old and slow.
-
QuestionHow do I use this on Linux?Community AnswerYou use the command: "java -jar ". You can also run these files by clicking on them on some distros of Linux, but it does not happen on most.
-
QuestionWhy doesn't the .Jar file I created run?Community AnswerYou created it as some sort of place where you'll archive things. Even though you created a jar file, it doesn't mean that it is an executable, so it won't run.
Warnings
- Java is safer than most programming languages, but malware written in Java still exists. Be cautious of running JAR files downloaded from online.⧼thumbs_response⧽
About This Article
1. Install Java on your computer.
2. Make sure the JAR file is executable.
3. Double-click the JAR file to open it.