File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ cdef void create_jnienv() except *:
45
45
args.nOptions = len (optarr)
46
46
args.ignoreUnrecognized = JNI_FALSE
47
47
48
+ attempted = []
48
49
if sys.version_info >= (3 , 8 ):
49
50
# uh, let's see if this works and cleanup later
50
51
java = get_java_setup(' win32' )
@@ -61,15 +62,18 @@ cdef void create_jnienv() except *:
61
62
if not os.path.isdir(path):
62
63
continue
63
64
with os.add_dll_directory(path):
65
+ attempted.append(path)
64
66
try :
65
67
ret = JNI_CreateJavaVM(& jvm, < void ** > & _platform_default_env, & args)
66
68
except Exception as e:
67
69
pass
68
70
else :
69
71
break
70
72
else :
71
- raise Exception (" Unable to create jni env, no jvm dll found." )
72
-
73
+ if len (attempted) > 0 :
74
+ raise Exception (" Unable to create jni env, no jvm dll found in %s " % str (attempted))
75
+ else :
76
+ raise Exception (" Unable to create jni env, no valid java library paths were found in %s , perhaps you need to update JAVA_HOME" % jdk_home)
73
77
else :
74
78
ret = JNI_CreateJavaVM(& jvm, < void ** > & _platform_default_env, & args)
75
79
You can’t perform that action at this time.
0 commit comments