⛔️ 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,
- Press Windows + R to open Run.
- Type appwiz.cpl and press enter to quickly open Programs and Features.
- Check if Java is installed. If not go to https://java.com/en/download/ and download and install lastest version of Java
- Now try to run the jar again!, it should work!
1. Check Java is installed
C:\Users\Code2care>java -version
openjdk version "11.0.8" 2020-07-14 LTS
OpenJDK Runtime Environment Corretto-11.0.8.10.1 (build 11.0.8+10-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.8.10.1 (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
Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!