⛔️ 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,
- Get the current timestamp in Java
- Java Stream with Multiple Filters Example
- Java SE JDBC with Prepared Statement Parameterized Select Example
- Fix: UnsupportedClassVersionError: Unsupported major.minor version 63.0
- [Fix] Java Exception with Lambda - Cannot invoke because object is null
- 7 deadly java.lang.OutOfMemoryError in Java Programming
- How to Calculate the SHA Hash Value of a File in Java
- Java JDBC Connection with Database using SSL (https) URL
- How to Add/Subtract Days to the Current Date in Java
- Create Nested Directories using Java Code
- Spring Boot: JDBCTemplate BatchUpdate Update Query Example
- What is CA FE BA BE 00 00 00 3D in Java Class Bytecode
- Save Java Object as JSON file using Jackson Library
- Adding Custom ASCII Text Banner in Spring Boot Application
- [Fix] Java: Type argument cannot be of primitive type generics
- List of New Features in Java 11 (JEPs)
- Java: How to Add two Maps with example
- Java JDBC Transition Management using PreparedStatement Examples
- Understanding and Handling NullPointerException in Java: Tips and Tricks for Effective Debugging
- Steps of working with Stored Procedures using JDBCTemplate Spring Boot
- Java 8 java.util.Function and BiFunction Examples
- The Motivation Behind Generics in Java Programming
- Get Current Local Date and Time using Java 8 DateTime API
- Java: Convert Char to ASCII
- Deep Dive: Why avoid java.util.Date and Calendar Classes
More Posts:
- [Fix] Office 365 Sharepoint One Drive Error: Something went wrong. This is a temporary issue - SharePoint
- How to Configure Eclipse keymap in IntelliJ IDE - Android-Studio
- [fix] command not found curl - cURL
- How to Kill service running on port using terminal command - HowTos
- Insert Auto Increment Value using PreparedStatement in Java JDBC - Java
- Fix: npm vs code eacces permission denied unlink /usr/local/bin/code - JavaScript
- How to change the default font and text size in Microsoft Excel for Mac - MacOS
- Youtube spacebar not working in search on macOS Safari - MacOS