Java Native Interface 32 bit dll on 64 bit system

前端 未结 6 1651
春和景丽
春和景丽 2020-12-01 10:18
E:\\Code\\Java\\JNITest>java test
Exception in thread \"main\" java.lang.UnsatisfiedLinkError: E:\\Code\\Java\\JNITest\\test.dll: Can\'t load IA 32-bit .dll on a          


        
6条回答
  •  伪装坚强ぢ
    2020-12-01 11:10

    Just to state the obvious: to load a native library built for a 32bit architecture, you have to force the JVM to start in 32bit mode.

    java -d32 ...
    

    Possibly you need to install an older JVM for your platform (eg. Oracle's Java 7 on OS X is 64bit only, you need to get Apple's Java 6 from their knowledge base).

提交回复
热议问题