Java. Lang. unsatisfiedlinkerror: No Java in Java. Library. Path

Source: Internet
Author: User

Today, when I was working on a project, I encountered a problem. I started it normally under tomcat in the bin directory, but an error was reported when I started it under the eclipse directory, and a strange exception was reported.

Java. Lang. unsatisfiedlinkerror: No haspjava in Java. Library. Path

Later I checked on the internet, need to download a tcnative-1.dll file, but put in the Windows/system32 directory, the result is still not good

Later, I checked the path C:/Java/jdk_1.6.2/bin directory and put it in. The result will not work as usual.

Why? Then I calmed down and thought about whether the no haspjava in Java. Library. path could not find the haspjava. dll file. Will it be wrong?

Go to the window/system32 directory and find haspjava. dll. The result is found. It may be that the path is wrong,

Then put the haspjava. dll file under C:/Java/jdk_1.6.2/bin, restart tomcat, OK, it is normal

Conclusion: directly start Tomcat and run the settings configured in the current environment variable. Starting Tomcat from eclipse will mix eclipse startup environment, so there will be some differences, the order in which eclipse is started is still in the path. Therefore, we suggest placing the JDK configuration at the beginning of the path so that it can be searched as quickly as possible.

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.