JNI_CreateJavaVM always returns -1
March 20th, 2009
Applies to:
JNI
Description:
Occurs while using JNI.
Cause:
Usually, the problem is that you moved or copied the jvm.dll file. The location of jvm.dll is important, it has to be in the directory
Applies to:
JNI
Description:
Occurs while using JNI.
Cause:
Usually, the problem is that you moved or copied the jvm.dll file. The location of jvm.dll is important, it has to be in the directory
JAVA-JNI createjavavm返回-4, find, j, jni error jni_createjavavm, jni jni_createjavavm 64 binserverjvm.dll, jni_createjavavm, jni_createjavavm "-3", jni_createjavavm "-4", jni_createjavavm -rc 3, jni_createjavavm error, jni_createjavavm error "-3", jni_createjavavm error,rc=-4, jni_createjavavm return "-3", jni_createjavavm return -4, jni_createjavavm returns -3, jni_createjavavm returns -3#sclient=psy-ab, jni_createjavavm returns -4, jni_createjavavm returns 1, jni_createjavavm was:-3, jni_createjavavm x64, jni_createjavavm 返回error, jni_createjavavm返回-3, lrm-00118: syntax error at '=' at the end of input, windows x64 java jni_createjavavm
The problem manifests itself for those using the invocation API who want to keep their PATH simple, containing only\bin. You need \bin\classic; \bin in your PATH. This does not work:
# Do not do this!
cd jre\bin
copy classic\jvm.dll .
Note that on Windows you can use also use the registry key:
HKEY_LOCAL_MACHINE\Software\JavaSoft\JRE\RuntimeLib
to find the path to jvm.dll and load it with LoadLibrary.