Article Summary. Method 1. Install Java on your computer if it isn't installed. You can't run JAR files without Java installed on your computer. You may have to restart your computer for Java to be fully implemented. Double-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. Make 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. 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. Update Java. If your JAR file produces an error when you double-click it, you may need to update Java. Double-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.
Method 2. Try double-clicking your JAR file. If double-clicking the file doesn't open it, proceed to the next step. If you downloaded your JAR file from online, make sure you downloaded the Mac version and not another operating system's version. You just download them. Minecraft won't affect it unless your computer is really old and slow.
Not Helpful 4 Helpful 7. You 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. You 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.
Not Helpful 24 Helpful Yes, as long as you have either Crostini or Crouton installed. Crouton: github. 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. 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. You can use the Jar tool to unpack a JAR file. When extracting files, the Jar tool makes copies of the desired files and writes them to the current directory, reproducing the directory structure that the files have in the archive. This section shows you how to update the contents of an existing JAR file by modifying its manifest or by adding files.
This section shows you how to invoke and run applets and applications that are packaged in JAR files.
0コメント