"Resolved" Error running eclipse: Failed toload the JNI shared library

Source: Internet
Author: User

"Resolved" Run Eclipse Error: Failed toload The JNI shared library

Problem

Run Android of the ADT , i.e. Eclipse Error:

Failed to load the jnishared library

C:\Program Files (x86) \java\jre6\bin\client\jvm.dll


The background is:

1. It has been able to operate normally, that is, the JRE6 has been installed properly.

2. The JRE6 was later removed.

3. Just went to reinstall the JRE6, the result is still wrong.

4. And already determined: C:\ProgramFiles (x86) \java\jre6\bin\client\jvm.dll is present.

"Resolution Process"

1. Now find a way to figure out why it is still not working.

Do you need to restart the computer before you can???

2. Go to a casual look at the current eclipse configuration:

The D:\tmp\tmp_dev_root\android\adt-bundle-windows\eclipse\eclipse.ini are:

-dosgi.requiredjavaversion=1.6
Java is clearly required to be version 1.6.

3. Reference is made to:

http://aquilo.diandian.com/post/2012-05-27/21832516

It didn't feel much help.

4. Also refer to:

http://dongdong1314.blog.51cto.com/389953/490211

To confirm the previously installed JDK, it is

Jdk-6-windows-amd64.exe, and indeed 64-bit. The result is still not good.

5. Reinstall Jdk-6-windows-amd64.exe and try again.

6. I remember it. There must be something wrong with that. Because the above hint is C:\Program Files (x86) \ means that Eclipse wants 32-bit java. So, here, it seems to still need to find out, is not where the environment variable, or the registry, the residue of this path, to remove, update to the latest C:\Program files\ Java path can be.

7. Sure enough, in the PATH environment variable, you see that there are two Java-related paths:

C:\Program Files (x86) \java\jre6\bin: It was added before, presumably after installing the JRE.

C:\Program Files\java\jdk1.6.0\bin: After the JDK is just installed, you manually add to it, so it is very simple.

To delete the old path first:

C:\Program Files (x86) \java\jre6\bin as a result, the problem remains.

8. Finally, it was found that the environment variable:

Java_home=c:\program Files (x86) \java\jre6

Therefore, the corresponding value is always not found, now change it to:

Java_home=c:\program files\java\jdk1.6.0

And, in path, it already has:%java_home%\bin so, it should be.

To try it, sure enough, you can run eclipse, here's ADT:


Summary

When running Java-based stuff, here is eclipse (ADT for developing Android), if it appears:

Failed to load the JNI shared Libraryc:\program Files (x86) \java\jre6\bin\client\jvm.dll

Kind of problem when it is very simple, first go to see if the corresponding path, whether really exist Jvm.dll

If not, it is obvious that you need to install the corresponding version of their own to the Oracle website to download, the corresponding version of the JRE or JDK such as mine is, x64 's Win7, downloaded a: Jdk-6-windows-amd64.exe. Check to see if the JAVA environment variable is normal: Java_home: It should be your JRE or JDK installation path

For example, I am here, 64-bit Win7, installed 64-bit JDK 6, so after installation, the corresponding path is:

C:\Program files\java\jdk1.6.0

The Java Bin directory should be included in the Path:path, similar to

C:\Program Files (x86) \java\jre6\bin\

Hint: But because the java_home has been set up, it can be more general written as

%java_home%\bin

Also, Tip:

In a 64-bit (Win7) system, the corresponding software installation directory:

32-bit software, installed by default to: C:\ProgramFiles (x86) \

64-bit software, installed by default to: C:\ProgramFiles\

"Resolved" Error running eclipse: Failed toload the JNI shared library

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.