jpype.getDefaultJVMPath() fails when I try accessing JVM from python3

Viewed 3689

I am currently using Python3, java8, jpype 0.6.3 version on windows10. jpype.getDefaultJVMPath() fails with an error :

raise JVMNotFoundException("No JVM shared library file ({0}) "
jpype._jvmfinder.JVMNotFoundException: No JVM shared library file (jvm.dll) found. Try setting up the JAVA_HOME environment variable properly.

My JAVA_HOME points to C:\Program Files (x86)\Java\jdk1.8.0_241

If I try starting JVM directly by passing the jvm.dll path("C:\Program Files (x86)\Java\jdk1.8.0_241\jre\bin\client\jvm.dll) python program crashes. I have already given executable permission to .dll file

Could anyone please help me fix this issue for the above system specifications

2 Answers

It is possible that your JVM architecture (32 bit) does not match your Python (64 bit). This would cause the symptoms you are describing.

It turns out that the shared code I was using required a specific version of one of the drivers. I still don't understand it all enough to explain why that was but with the older driver version (from a colleague) everything works!

Related