diff --git a/pyreportjasper/jasperpy.py b/pyreportjasper/jasperpy.py index 8592a1c..86c9c10 100644 --- a/pyreportjasper/jasperpy.py +++ b/pyreportjasper/jasperpy.py @@ -11,7 +11,6 @@ import tempfile import jpyutil -import jpy import json from requests import Request, Session @@ -52,7 +51,8 @@ def __init__(self, resource_dir=False, jvm_maxmem='512M', jvm_classpath=None): jpyutil.init_jvm(jvm_maxmem=jvm_maxmem, jvm_classpath=[self.CLASSPATH]) else: jpyutil.init_jvm(jvm_maxmem=jvm_maxmem, jvm_classpath=[self.CLASSPATH, jvm_classpath]) - + # import jpy here after init_jvm + import jpy self.jvFile = jpy.get_type('java.io.File') self.jvArrays = jpy.get_type('java.util.Arrays') self.jvReport = jpy.get_type('de.cenote.jasperstarter.Report')