How to open/run .jar file (double-click not working)?
To open a .jar file on a Windows system, you can do one of the following:
To open a .jar file on a Windows system, you can do one of the following:
- Double-click the
.jarfile. This should open the file if you have Java installed and the.jarextension is associated with the Java runtime. If double-clicking does nothing, manually associate the file type: right-click the.jarfile → Open with → Choose another app → selectjava.exe→ check Always use this app to open .jar files. - Use the
java -jarcommand to run the.jarfile. Open a command prompt and navigate to the directory containing the.jarfile. Then, enter the following command:
java -jar filename.jarReplace filename.jar with the name of your .jar file. This will run the .jar file using the Java runtime.
On macOS or Linux, open a terminal, navigate to the directory, and run the same java -jar filename.jar command.