diff --git a/jpype/_core.py b/jpype/_core.py index 9c7945ed7..5ea7850bf 100644 --- a/jpype/_core.py +++ b/jpype/_core.py @@ -151,7 +151,7 @@ def _handleClassPath( out.extend(glob.glob(pth + '.jar')) else: out.append(pth) - return out + return _classpath._SEP.join(out) _JVM_started = False @@ -238,6 +238,7 @@ def startJVM( classpath = _classpath.getClassPath() # Handle strings and list of strings. + extra_jvm_args = () if classpath: extra_jvm_args += (f'-Djava.class.path={_handleClassPath(classpath)}', ) @@ -273,20 +274,20 @@ def startJVM( raise RuntimeError(f"{jvmpath} is older than required Java version{version}") from ex raise - """Prior versions of JPype used the jvmargs to setup the class paths via - JNI (Java Native Interface) option strings: - i.e -Djava.class.path=... - See: https://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/invocation.html - - Unfortunately, unicode is unsupported by this interface on windows, since - windows uses wide-byte (16bit) character encoding. - See: https://stackoverflow.com/questions/20052455/jni-start-jvm-with-unicode-support - - To resolve this issue we add the classpath after initialization since jpype - itself supports unicode class paths. - """ - for cp in _handleClassPath(classpath): - addClassPath(Path.cwd() / Path(cp).resolve()) +# """Prior versions of JPype used the jvmargs to setup the class paths via +# JNI (Java Native Interface) option strings: +# i.e -Djava.class.path=... +# See: https://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/invocation.html +# +# Unfortunately, unicode is unsupported by this interface on windows, since +# windows uses wide-byte (16bit) character encoding. +# See: https://stackoverflow.com/questions/20052455/jni-start-jvm-with-unicode-support +# +# To resolve this issue we add the classpath after initialization since jpype +# itself supports unicode class paths. +# """ +# for cp in _handleClassPath(classpath): +# addClassPath(Path.cwd() / Path(cp).resolve()) def initializeResources():