>>> import boilerpipe
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Anaconda\lib\site-packages\boilerpipe\__init__.py", line 10, in <module>
jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.class.path=%s" % os.pathsep.join(jars))
File "C:\Anaconda\lib\site-packages\jpype\_core.py", line 50, in startJVM
_jpype.startup(jvm, tuple(args), True)
RuntimeError: Unable to load DLL [C:\Program Files\Java\jre7\bin\client\jvm.dll], error = The specified module could not be found.
at native\common\include\jp_platform_win32.h:58
Tried: Reinstalling jvm
>> import ctypes
>> import os
>> os.chdir(r"<path to Java bin client folder>")
>> ctypes.CDLL("jvm.dll")
Still unable to fix
Edit: Tried code below, still stuck:
from py4j.java_gateway import JavaGateway
gateway = JavaGateway()
It gives the same error as before.
The seamless interaction between Python and Java allows developers to freely mix the two languages both during development and in shipping products.
Jpype Python Module Python provides many modules that allows you to interact with native Java libraries. Among them, jpype is one of the easiest and widely used python module. Jpype is one of the python module that allows you to interact with Java libraries.
Check Please !
"C:\\Program Files\\Java\\jre7\\bin\client\\jvm.dll"
)jvm.dll
(can run)import ctypes
ctypes.CDLL('C:\\Program Files\\Java\\jre7\\bin\\client\\jvm.dll')
***Maybe can't throw the hook of some java versions
i used jre-7u55-windows-i586.exe
i hope helpful ! Best regards !
Works on wine(no bug):
Answering because I don't have enough rep for commenting; Try using raw strings instead of the normal ones allowing "\x" escapes. Try:
>>> ctypes.CDLL(r'C:\Program Files (x86)\Java\jre1.8.0_40\bin\client\jvm.dll')
Because the "\..." parts of the string could very well be escapes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With