Error: Unable to access jarfile jarFileName.jar file [Windows]

⛔️ Error: Unable to access jarfile jarFileName.jar

If you are trying to open a jar file and it does not work and you even tried to open the jar via command line using Java jar command java -jar jarFileName.jar there here is how you can fix this issue on Windows 10,

  1. Press Windows + R to open Run.
  2. Type appwiz.cpl and press enter to quickly open Programs and Features.
  3. Check if Java is installed. If not go to and download and install lastest version of Java
  4. Now try to run the jar again!, it should work!
Some Troubleshooting steps

1. Check Java is installed

C:\Users\Code2care>java -version
openjdk version "11.0.8" 2020-07-14 LTS
OpenJDK Runtime Environment Corretto- (build 11.0.8+10-LTS)
OpenJDK 64-Bit Server VM Corretto- (build 11.0.8+10-LTS, mixed mode)

2. Check Java Environment variable is set

C:\Users\Code2care>echo %JAVA_HOME%
C:\Program Files\Android\Android Studio\jre\jre

Recent Posts:

Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.