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

后端 未结 14 2264
逝去的感伤
逝去的感伤 2020-12-24 05:20

I am trying to use SVMLight from Java, using the JNI wrapper on this page:

  static {
    System.loadLibrary(\"lib/JNI_SVM-light-6.01/lib/svmlight\");
  }


        
相关标签:
14条回答
  • 2020-12-24 05:35

    Got this from - http://blog.cedarsoft.com/2010/11/setting-java-library-path-programmatically/

    If set the java.library.path, need to have the following lines in order to work.

    Field fieldSysPath;
    fieldSysPath = ClassLoader.class.getDeclaredField( "sys_paths" );
    fieldSysPath.setAccessible( true );
    fieldSysPath.set( null, null );
    
    0 讨论(0)
  • 2020-12-24 05:36

    Yes, you'll have to recompile the DLL for 64-bit. Your only other option is to switch to a 32-bit JVM, or otherwise get some 32-bit process to load the DLL on your behalf and communicate with that process somehow.

    0 讨论(0)
  • 2020-12-24 05:36

    I had the same issue with a Java application using tibco dll originally intended to run on Win XP. To get it to work on Windows 7, I made the application point to 32-bit JRE. Waiting to see if there is another solution.

    0 讨论(0)
  • 2020-12-24 05:37

    Just go to install download jdk_x86 and it install in Program Files (x86) and set the jre path in your project. Thats it.

    0 讨论(0)
  • 2020-12-24 05:41

    For your Native library location, use X64 over X86. At least this fixed problem I had.

    0 讨论(0)
  • 2020-12-24 05:43

    I had a problem when run red5(tomcat) on Windows x64 that previous worked under Windows x32, got next error:

     INFO pool-15-thread-1 com.home.launcher.CommandLauncher - Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\....\lib\Data Samolet.dll: Can't find dependent libraries
    INFO pool-15-thread-1 com.home.launcher.CommandLauncher - at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    

    Problem solved when I installed Java x32 version and set next

    "Environment variables"

    "User variables for Home"

    JAVA_HOME => C:\Program Files (x86)\Java\jdk.1.6.0_45

    "System variables"

    Path[at the beginning] => C:\Program Files\Java\jdk.1.8.0_60;..

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