C ++ application with JNI gives the error message "jvm.dll not found. Re-installing the application may fix ..."

I wrote a simple C ++ application in VC6 that uses jni to invoke a method in java. To do this, I included jni.h and other lib folders in the project directories.

the code compiles, but when I run the application, it fails saying: "jvm.dll was not found. reinstalling the application will fix it." But jvm.dll is present in my computer.

If I install the working directory of the application in the place where jvm.dll is located, then it works like a charm. I can not install the working directory of the application in the jvm.dll directory, because this application will be dll in the future.

I also tried updating the PATH variable in the system variables to the location of jvm.dll, but nothing works.

I suspect jvm.lib is loading jvm.dll from a specific directory location that is not provided by my application .. so its crashing, ..

Please suggest me what goes wrong.

Thanks in advance.

Relationship Raghavendra

+4
source share
1 answer

he does not say: "jvm.dll not found, reinstalling the application will fix it."

Obviously your own error message or Windows: not Java, and it is incorrect. Reinstalling the application cannot affect whether jvm.dll can be found.

You need to make sure jvm.dll is on your PATH.

+1
source

Source: https://habr.com/ru/post/1445788/


All Articles