⛔️ 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,
- [Fix] java.time.zone.ZoneRulesException: Unknown time-zone ID
- Parse XML file in Java using DOM Parser
- Java equals method - Tutorial
- [Program] How to read three different values using Scanner in Java
- Java: The value of the local variable string is not used
- Display Output in Java Console as a Table
- How to detect Operating System using Java code
- Java 8 Streams map() with examples
- [Fix] java: incompatible types: incompatible parameter types in lambda expression error
- Add newline character Java code example (\r \n \r\n)
- List of Java Major Minor Version Numbers
- IntelliJ Keyboard Shortcut to remove unused imports [Java]
- Java - Check if array contains the value
- [Fix] Java Exception with Lambda - Cannot invoke because object is null
- How to declare and initialize Array in Java Programming
- [Solved] com.sun.xml.ws.transport.http.servlet.WSServletContextListener ClassNotFoundException
- XmlRpcException ConnectException connection refused error
- Create a Zip file using Java Code programmatically
- List of jar files for Jax-ws (SOAP) based Java Web Services
- How to fix Java HTTP java.net.UnknownHostException
- List of jars required for Struts2 project
- [fix] java: incompatible types: double cannot be converted to java.lang.Integer Generics
- Maven BUILD FAILURE: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin
- Get the current timestamp in Java
- java: unclosed string literal [Error]
More Posts:
- How to get an embed code from Vimeo? - HowTos
- How to install Python 3.9 using brew on Mac - Python
- 🔥 [BTS ARMY] #ExaBLINK, #ExaARMY hashtags trending worldwide - BTS
- fill_parent vs match_parent vs wrap_content - Android
- JavaScript date in yyyy-MM-dd format - JavaScript
- How to make zsh as the default shell on Ubuntu - zsh
- Locate Notepad++ unsaved files backup location - NotepadPlusPlus
- MySQL #6 - Error on delete of './my-database/db.opt' (Errcode: 13 - Permission denied) - MySQL