Error A JNI error has occurred. Please check your installation and try again in Eclipse x86 Windows 8.1
Solution 1: Right-click on the class that contains the main method. Click on "Run As". Click on "Java Application". The keyboard shortcut is: Shift + Alt + X, J (while holding Shift and Alt, press X; then release Shift and Alt and press J).
Solution 2: As Professor mentioned, please make sure that java -version
and javac -version
are the same.
Note: Solution 1 is a quick fix and worked for me and a few other people. It may or may not work for you. I think Solution 2 is the proper way to solve it.
Error: A JNI error has occurred, please check your installation and try again in Maven Project in Eclipse EE
I ran the jar file in command line and discovered that a classpath wasn't found, which is directed by the following code:
@PropertySource("classpath:aws.properties")
I added the needed file in src/main/resources in the project, which holds the following key/value pairs:
aws_access_key_id=...
aws_secret_access_key=...
That fixed that problem, leading to another error I won't discuss here.
Error A JNI error has occurred. Please check your installation and try again in Eclipse x86 Windows 8.1
Solution 1: Right-click on the class that contains the main method. Click on "Run As". Click on "Java Application". The keyboard shortcut is: Shift + Alt + X, J (while holding Shift and Alt, press X; then release Shift and Alt and press J).
Solution 2: As Professor mentioned, please make sure that java -version
and javac -version
are the same.
Note: Solution 1 is a quick fix and worked for me and a few other people. It may or may not work for you. I think Solution 2 is the proper way to solve it.
Error: A JNI error has occurred, please check your installation and try again in IntelliJ IDEA
I found a solution, editing a component configuration in .idea/misc.xml
.
It was
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_9" project-jdk-name="9.0" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
and I changed it into
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="8.0" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
Then an applet appeared, which helped me add a new JDK (Java8) and I was able to run my project and the error disappeared.
Related Topics
Split Regex to Extract Strings of Contiguous Characters
How to Create a Project from Existing Source in Eclipse and Then Find It
Calling Win32 API Method from Java
How to Convert Pojo to JSON and Vice Versa
Java Convert Gmt/Utc to Local Time Doesn't Work as Expected
Java - Why No Return Type Based Method Overloading
How to Create a Custom Exception Type in Java
Convert String to Int Array in Java
Check Line for Unprintable Characters While Reading Text File
Where Do I Have to Place the Jdbc Driver for Tomcat's Connection Pool
Java 8: Where Is Trifunction (And Kin) in Java.Util.Function? or What Is the Alternative
Documentlistener Java, How to Prevent Empty String in Jtextbox
How to Set Hard Limit on a Jcomponent When Setmaximumsize() and Setprefferedsize() Don't Work
How to Abort a Thread in a Fast and Clean Way in Java
Does Java Have Buffer Overflows