Error "A Jni Error Has Occurred. Please Check Your Installation and Try Again in Eclipse X86 Windows 8.1"

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



Leave a reply



Submit