fix bug where all java builds & tests fail to run SanityCheck on JDK11

Needed a classpath set in the current working directory.
This was on a Zulu build of OpenJDK 11.0.17 on a macOS ARM machine.

The errors folks might encounter:
Error: Could not find or load main class SanityCheck
Caused by: java.lang.ClassNotFoundException: SanityCheck
pull/12283/head
Alan Brooks 1 year ago committed by Jussi Pakkanen
parent 8d6b474bf6
commit c1ac252f4f
  1. 2
      mesonbuild/compilers/java.py

@ -100,7 +100,7 @@ class JavaCompiler(BasicLinkerIsCompilerMixin, Compiler):
raise EnvironmentException(f'Java compiler {self.name_string()} cannot compile programs.')
runner = shutil.which(self.javarunner)
if runner:
cmdlist = [runner, obj]
cmdlist = [runner, '-cp', '.', obj]
pe = subprocess.Popen(cmdlist, cwd=work_dir)
pe.wait()
if pe.returncode != 0:

Loading…
Cancel
Save