⛔️ 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
More Posts related to Java,
- Java equals method - Tutorial
- Unbound classpath container: JRE System Library [JavaSE-1.7]
- Spring Boot: @RequestBody not applicable to method
- Java 8: Steam map with Code Examples
- Java Program: Random Number Generator
- Java java.time.Clock class code examples [Java Date Time API]
- Fix: type argument is not within bounds of type-variable T
- [Fix] java.net.MalformedURLException: unknown protocol
- Java 7 addSuppression() and getSuppression() Exception Handling
- Convert Java Array to ArrayList Code Example
- How to Word-Warp Console logs in IntelliJ
- Ways Compare Dates in Java Programming with Examples
- Remove Trailing zeros BigDecimal Java
- CRUD operations in Spring Boot + JDBC
- [Java Threads] Should we extend Thread Class or implement Runnable interface
- Json Serialization and Deserialization using Java Jackson
- Create simple struts2 project using maven commands
- How to install Java OpenJDK 11 on Alpine Linux
- Unsupported major.minor version 52.0 in java
- Error: Can not find the tag library descriptor for
- Java: Convert String to Binary
- How to run Java Unit Test cases with Apache Maven?
- Java: Testing Private Methods in JUnit using reflection API Example
- Java JDBC Connection with MySQL Driver in VS Code + Troubleshooting
- Java Join Strings with Comma Separator
More Posts:
- [fix] RabbitMQ: AuthenticationFailureException ACCESS_REFUSED Login refused authentication mechanism PLAIN - 2022
- Convert Javascript object to JSON String example - JavaScript
- 26: How to set Environment Variables using Python - Python
- Program 10: Modulo of Two Numbers - 1000+ Python Programs - Python-Programs
- Java: Create Temporary Directory and File and Delete when application terminates - Java
- Create RabbitMQ Exchange using Java Spring Boot Example - Java
- MySQL : Error :1000 SQLSTATE: HY000 (ER_HASHCHK) Message: hashchk Server Error - MySQL
- How to reset an Apple Watch without an iPhone - Apple