Java jar files do not open by double click on Windows

Case

You need to run a Java Archive File (JAR) to execute a Java Runtime Environment (JRE) based application in a Windows 10, 11 or Windows Server environment. Double clicking the JAR file does not case any action or it does not work as expected and the Java application is not launched.

Solution

You should carry out the following steps:

  • Uninstall the current JRE version and download and install the latest version for your operating system from the Oracle website. Take the installation bitiness into account, i.e. 32-bit vs 64-bit.
  • Ensure that the JAR file type association (FTA) is configured correctly for your operating system. Set Java.exe as a default application for the .jar Files.
  • Create a Windows .bat or .cmd file and execute the jar file by running the following command: javaw -jar [jar file path/name].
  • If all else fails, download and run the free JarFix tool, which is available at https://johann.loefflmann.net/en/software/jarfix/index.html. The jarfix tool fixes any .jar file issues when trying to launch by double-click.

Was this article helpful?

Related Articles