• Register
0 votes
627 views

Problem :

My code works perfectly on my friend's laptop But throws below error on my laptop.

“Error: a jni error has occurred, please check your installation and try again”

I have tried running the code on a Eclipse Juno using Java 7. I have also tested it and also ran a lot of java programs on the laptop all works well. This is a only program which gives above error. This is related to my final year project and I need it to work on my laptop at any case, I will be very grateful to anyone who solves it.

7 5 2
3,870 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

Answer: Please right-click on a class that contains a main method. Click on the "Run As". Click on a "Java Application". A keyboard shortcut is: Shift+Alt+X J (while holding Shift and Alt, press the X; then release Shift and Alt and press the J).

Detailed Explanation: I am not 100% sure why above problem happens. It may be because of the use of a different jdk. I faced a same error. A solution was easier than I imagined. I was used to run my code using the Ctrl + F11. But when I ran it as the java application (the way I described in the "Answer"), my problem was resolved.

Hope it fixes your problem too!

9 7 4
38,600 points

Related questions

0 votes
1 answer 2 views
2 views
Problem: I need assistance in resolving this problem in error a jni error has occurred please check your installation and try again.
asked 5 days ago tuhin1 47.2k points
0 votes
1 answer 10 views
10 views
Problem : failed to load jni shared library jvm.dll eclipse
asked Feb 25 Shovo210 13.2k points
0 votes
1 answer 1 view
1 view
Problem: I'll make a submission for a response to my question. Please, I have searched the internet but have not found any useful material, and I am now having trouble continuing my studies.
asked Apr 1 rakib1 51.3k points
0 votes
1 answer 3 views
3 views
Problem: How do I fix this problem? the online content is unavailable please, check your internet connection and try again
asked Apr 1 rakib1 51.3k points
0 votes
1 answer 13 views
13 views
Problem: please check your network connection and try again android.
asked Feb 19 Dan phillip 4.7k points
0 votes
0 answers 24 views
24 views
Problem: How to fix this error:your session has expired. please refresh the page and try again.
asked Mar 3 amir.zaib45 1.2k points
0 votes
1 answer 2 views
2 views
Problem: I need assistance in resolving this problem: an error has occurred. please try again later.
asked 4 days ago rakib1 51.3k points
0 votes
1 answer 22 views
22 views
Problem: Can anyone help me out from this? How to fix this error? my computer showing this error, if anyone know how to fix it then please answer.
asked Mar 20 niyatiry 2.9k points
0 votes
1 answer 2 views
2 views
Problem: I need help in resolving this problem in The online content is unavailable please, check your internet connection and try again?
asked 5 days ago tuhin1 47.2k points
0 votes
1 answer 69 views
69 views
Problem : I am trying to retrieve the phone number from my Firebase database, but no matter how I enter it into my database it returns an error on my device as follows: "Message sent to invalid destination. Please check your number and try again. Msg 2127" The ... { // UIApplication.shared.openURL(url as URL) UIApplication.shared.open(urlph as URL, options: [:], completionHandler: nil) } } }
asked Dec 9, 2019 alecxe 7.5k points