Skip to content

Commit

Permalink
Fix setupext for JDK 8
Browse files Browse the repository at this point in the history
  • Loading branch information
Thrameos committed Nov 29, 2024
1 parent 3942798 commit 9b15bd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion jpype/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def startJVM(

java_class_path = _expandClassPath(classpath)
java_class_path.append(support_lib)
java_class_path = filter(len, java_class_path)
java_class_path = list(filter(len, java_class_path))
classpath = _classpath._SEP.join(java_class_path)

# Make sure our module is always on the classpath
Expand Down
6 changes: 3 additions & 3 deletions setupext/build_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,13 @@ def build_java_ext(self, ext):
cmd1 = shlex.split('%s -cp "%s" -d "%s" -g:none -source %s -target %s -encoding UTF-8' %
(javac, classpath, build_dir, target_version, target_version))
cmd1.extend(ext.sources)
os.makedirs("build/classes/META-INF/versions/0", exist_ok=True)
self.announce(" %s" % " ".join(cmd1), level=distutils.log.INFO)
subprocess.check_call(cmd1)

cmd1 = shlex.split('%s -cp "%s" -d "%s" -g:none -source %s -target %s -encoding UTF-8' %
(javac, build_dir, build_dir+"/META-INF/versions/0", target_version, target_version))
cmd1.extend(["native/java0/org/jpype/Reflector0.java"])
(javac, build_dir, os.path.join(build_dir,"META-INF","versions","0"), target_version, target_version))
cmd1.extend(glob.glob(os.path.join("native","java0","**","*.java"), recursive=True))
os.makedirs(os.path.join(build_dir,"META-INF","versions","0"), exist_ok=True)
self.announce(" %s" % " ".join(cmd1), level=distutils.log.INFO)
subprocess.check_call(cmd1)

Expand Down

0 comments on commit 9b15bd8

Please sign in to comment.