diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-03-04 11:31:44 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-03-05 11:25:21 +0200 |
commit | 38a3c30bc535c3ec2f70c70f83bda69acb58a12a (patch) | |
tree | b05930ef427cd234696016a95effea26ebd6c104 /mesonbuild | |
parent | ee863d33c134a78636c71392eac3a7c6939317e5 (diff) | |
download | meson-38a3c30bc535c3ec2f70c70f83bda69acb58a12a.zip meson-38a3c30bc535c3ec2f70c70f83bda69acb58a12a.tar.gz meson-38a3c30bc535c3ec2f70c70f83bda69acb58a12a.tar.bz2 |
Fix javac version lookup in JDK11. Closes #4322.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/environment.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 3bfdfd7..c25ef33 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -931,6 +931,10 @@ class Environment: raise EnvironmentException('Could not execute Java compiler "%s"' % ' '.join(exelist)) if 'javac' in out or 'javac' in err: version = search_version(err if 'javac' in err else out) + if not version or version == 'unknown version': + parts = (err if 'javac' in err else out).split() + if len(parts) > 1: + version = parts[1] return JavaCompiler(exelist, version) raise EnvironmentException('Unknown compiler "' + ' '.join(exelist) + '"') |