>>> import boilerpipe
Traceback (most recent call last):
File \"\", line 1, in
File \"C:\\Anaconda\\lib\\site-packages\\boil
If you are trying to access JVM on Windows operation system, make sure you have the right version of JVM (32-bit or 64-bit) installed. In my case python was 64-bit and once I installed Java 64-bit, it worked without needing to specify the path or any other extra requirements.
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.
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):
The answers above are not sufficient, one also needs to install the Microsoft Visual C++ 2010 Redistributable Package (x86) as per Bjorns answer.
After installed the C++ redistributable:
Use paths as mentioned above to start jvm:
path_to_jvm = "C:\Program Files\Java\jre7\bin\client\jvm.dll"
jpype.startJVM(path_to_jvm)
jpype.startJVM(jpype.getDefaultJVMPath())