tcnative-1.dll Can't load AMD 64-bit .dll on a IA 32-bit platform

前端 未结 7 577
南旧
南旧 2020-12-29 03:20

I\'m getting this error when I try to run tomcat:

"java.lang.UnsatisfiedLinkError: C:\\Program Files (x86)\\apache-tomcat-7.0.34\\bin\\tcnative-1.dll: Ca         


        
相关标签:
7条回答
  • 2020-12-29 03:22

    Please check your Project SDK version used by IDE.

    In Intellij IDEA:  File -> Project Structure -> Project.
    In Eclipse:        Properties -> Java Compiler.
    

    Switch it to JDK x64 version installed.

    0 讨论(0)
  • 2020-12-29 03:27

    Oh man, I found the problem. I had an old JRE in a weird place which was being accessed by JRE_HOME. I removed that dir, fixed my environment variables, and that took care of it.

    0 讨论(0)
  • 2020-12-29 03:32

    I just found the solution. The problem was that my JRE_HOME pointed to a 32 bit JRE where in my machine was a 64 bit machine. I installed the 64 bit JRE and replaced it in the system variable and the server started clean

    0 讨论(0)
  • 2020-12-29 03:39

    Please check your default version pointed by eclipse.Properties->Java Compiler. Switch it to your JRE version installed. This worked for me. Thanks.

    0 讨论(0)
  • 2020-12-29 03:40

    Necromancing on a windows server (March 2019). There are several answers on stack overflow, for the problem Can't load AMD 64-bit .dll on a IA 32-bit platform". All show just part of the solution. Here is everything together.

    The cause: a 32 bit version of Java is used, while the library expects a 64-bit version.

    (1) Make sure JAVA_HOME and CATALINA_HOME is set. Something like

    set JAVA_HOME=C:\Program Files\Java\jre1.8.0_201 set CATALINA_HOME=C:\Program Files (x86)\tomcat-9.0.16

    These were the default locations in March 2019. The real versions don't matter, what is important that the following commands should work:

    "%java_home%\bin\java.exe" -version
    "%catalina_home%\bin\configtest.bat"
    

    The first command should give you a few lines. One of the lines should say something like

    Java HotSpot(TM) 64-bit Server VM
    

    Of course 64-bit only on a 64-bit windows machine. (how to check: windows - run - system information. It should mention in System Type whether is is a 32 or 54 based system)

    The config test shows you the java and catalina home values that are used by TomCat.

    If you have the incorrect Java version:

    • Uninstall old Java version: Control Panel - (main page) Programs - Uninstall a program
    • Go to download Java manual download page. (Google if the link doesn't work anymore) Don't do automatic downloads, you might get a different version than you want, depending on your browsers.
    • Download windows offline 64-bit Don't do the online, again: it looks at your browsers to decide whether you want 32 or 64-bit.
    • run the installer.
    • After installing Java, check your Path and your environment variables and adjust accordingly (In windows server 2012: Control Panel - System and Security - System - Change Settings - Advanced - Environment Variables) -re-open a command prompt. Check Path and environment variables again and run the tests above.
    0 讨论(0)
  • 2020-12-29 03:42

    For the same message "Can't load IA 32-bit .dll on a AMD 64-bit platform" while trying to run a Jenkins slave on 64 bit windows machine, fixed it by removing JAVA_TOOL_OPTIONS and _JAVA_OPTIONS environment variables which were pointing to 32 bit jvmhook.

    0 讨论(0)
提交回复
热议问题