diff options
author | Alan Brooks <alan@alanbrooks.me> | 2023-09-15 22:27:05 -0500 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2023-09-25 18:27:24 +0300 |
commit | c1ac252f4ffecc381abe24e13584e1c48516e0eb (patch) | |
tree | 59f184922e1c34c00f55280ece94a67288ecf494 /mesonbuild/compilers | |
parent | 8d6b474bf67bb8a75e8f60196f7eaf7528a85c62 (diff) | |
download | meson-c1ac252f4ffecc381abe24e13584e1c48516e0eb.zip meson-c1ac252f4ffecc381abe24e13584e1c48516e0eb.tar.gz meson-c1ac252f4ffecc381abe24e13584e1c48516e0eb.tar.bz2 |
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
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r-- | mesonbuild/compilers/java.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers/java.py b/mesonbuild/compilers/java.py index 42cf0a1..9f508d6 100644 --- a/mesonbuild/compilers/java.py +++ b/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: |