better error when JAVA_HOME is not declared

This commit is contained in:
Gabriel Pettier 2019-10-10 21:15:49 +02:00
parent 9b0c9fbaf4
commit bed96ea722
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ cdef void create_jnienv() except *:
cdef bytes py_bytes
import jnius_config
JAVA_HOME = os.environ['JAVA_HOME']
JAVA_HOME = os.getenv('JAVA_HOME')
if JAVA_HOME is None or JAVA_HOME == '':
raise SystemError("JAVA_HOME is not set.")
IF JNIUS_PYTHON3: