Does anybody know, if JPype works with a Java 10 JRE?
I have tested JPype with Java 8 without any problems but I am not able to use it in combination with Java 10.
My test setup:
- Windows 10 64-bit
- Python 3.5.2 (Anaconda 4.2.0) 64-bit
- Spyder 3.3.0
- JPype 0.6.3 (via
pip install)
I execute my Python test script in Spyder (included in Anaconda package).
Test using Java 8 (jre1.8.0_181) succeeded.
JPype JVM starts without any problems.
Test using Java 10 (jre-10.0.2) fails with this error:
RuntimeError: Unable to load DLL [C:\Program Files\Java\jre-10.0.2\bin\server\jvm.dll], error = Das angegebene Modul wurde nicht gefunden.
at native\common\include\jp_platform_win32.h:58
I do have a german Windows version, so the part "Das angegebene Modul wurde nicht gefunden" may be translated as something like "The specified module cannot be found".
I used this Python code, to start the JVM in JPype:
import jpype
java_path = "C:\\Program Files\\Java\\jre-10.0.2\\bin\\server\\jvm.dll"
jpype.startJVM(java_path, '-ea')
Edit: Adding the whole test script
import jpype
import os
java_path = "C:\\Program Files\\Java\\jre-10.0.2\\bin\\server\\jvm.dll"
# java_path = "C:\\Program Files\\Java\\jre1.8.0_181\\bin\\server\\jvm.dll"
# print exists result to be sure the file exists
print(os.path.exists(java_path))
jpype.startJVM(java_path, '-ea')
print("it works")
If I use the Java 10 part, it does not work but if I use the Java 8 part (currently commented), it does work.
The first print command prints True in both cases.
Thank you in advance,
Markus
jvm.dllthat you are addressing is present in the location or not. Next, can you show the code that actually results in theRuntimeErroras mentioned in "Test using Java 10 (jre-10.0.2) fails with this error"? - Naman