summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
07660fd)
Empty JDK directories can remain from previous JDK installations. For
example in RHEL/Fedora when RPM upgrades a package it can leave modified
files (usually configs) and, consequently, their directories. So we could
end up selecting a bad JDK path.
m = re.match(regex, j)
if not m:
continue
m = re.match(regex, j)
if not m:
continue
- osxhome = os.path.join(d, 'Contents', 'Home')
- if os.path.exists(osxhome):
- thisconfig['java_paths'][m.group(1)] = osxhome
- else:
- thisconfig['java_paths'][m.group(1)] = d
+ for p in [d, os.path.join(d, 'Contents', 'Home')]:
+ if os.path.exists(os.path.join(p, 'bin', 'javac')):
+ thisconfig['java_paths'][m.group(1)] = p
for java_version in ('7', '8', '9'):
if java_version not in thisconfig['java_paths']:
for java_version in ('7', '8', '9'):
if java_version not in thisconfig['java_paths']: