Change required for JPype 0.7.0

master
Karl Nelson 2019-06-26 22:06:36 -07:00 committed by baztian
parent b49f5a62a2
commit 909429cf60
1 changed files with 4 additions and 1 deletions

View File

@ -173,7 +173,10 @@ def _jdbc_connect_jpype(jclassname, url, driver_args, jars, libs):
# jvm_path = ('/usr/lib/jvm/java-6-openjdk' # jvm_path = ('/usr/lib/jvm/java-6-openjdk'
# '/jre/lib/i386/client/libjvm.so') # '/jre/lib/i386/client/libjvm.so')
jvm_path = jpype.getDefaultJVMPath() jvm_path = jpype.getDefaultJVMPath()
if jpype.__version__.startswith("0.6"):
jpype.startJVM(jvm_path, *args) jpype.startJVM(jvm_path, *args)
else:
jpype.startJVM(jvm_path, *args, ignoreUnrecognized=True, convertStrings=True)
if not jpype.isThreadAttachedToJVM(): if not jpype.isThreadAttachedToJVM():
jpype.attachThreadToJVM() jpype.attachThreadToJVM()
if _jdbc_name_to_const is None: if _jdbc_name_to_const is None: