@@ -6877,7 +6877,7 @@ def classpath(names=None, resolve=True, includeSelf=True, includeBootClasspath=F
6877
6877
"""
6878
6878
cpEntries = classpath_entries(names=names, includeSelf=includeSelf, preferProjects=preferProjects)
6879
6879
cp = []
6880
- if includeBootClasspath:
6880
+ if includeBootClasspath and get_jdk().bootclasspath() :
6881
6881
cp.append(get_jdk().bootclasspath())
6882
6882
if _opts.cp_prefix is not None:
6883
6883
cp.append(_opts.cp_prefix)
@@ -7020,6 +7020,8 @@ def extract_VM_args(args, useDoubleDash=False, allowClasspath=False, defaultAllV
7020
7020
abort('Cannot supply explicit class path option')
7021
7021
else:
7022
7022
continue
7023
+ if i != 0 and (args[i - 1] in ['-mp', '-modulepath', '-limitmods', '-addmods', '-upgrademodulepath', '-m']):
7024
+ continue
7023
7025
vmArgs = args[:i]
7024
7026
remainder = args[i:]
7025
7027
return vmArgs, remainder
@@ -8207,15 +8209,19 @@ def _checkOutput0(out):
8207
8209
def _init_classpaths(self):
8208
8210
if not self._classpaths_initialized:
8209
8211
_, binDir = _compile_mx_class('ClasspathDump', jdk=self)
8210
- self._bootclasspath, self._extdirs, self._endorseddirs = [x if x != 'null' else None for x in subprocess.check_output([self.java, '-cp', _cygpathU2W(binDir), 'ClasspathDump'], stderr=subprocess.PIPE).split('|')]
8211
8212
if self.javaCompliance <= JavaCompliance('1.8'):
8213
+ self._bootclasspath, self._extdirs, self._endorseddirs = [x if x != 'null' else None for x in subprocess.check_output([self.java, '-cp', _cygpathU2W(binDir), 'ClasspathDump'], stderr=subprocess.PIPE).split('|')]
8212
8214
# All 3 system properties accessed by ClasspathDump are expected to exist
8213
8215
if not self._bootclasspath or not self._extdirs or not self._endorseddirs:
8214
8216
warn("Could not find all classpaths: boot='" + str(self._bootclasspath) + "' extdirs='" + str(self._extdirs) + "' endorseddirs='" + str(self._endorseddirs) + "'")
8215
- self._bootclasspath_unfiltered = self._bootclasspath
8216
- self._bootclasspath = _filter_non_existant_paths(self._bootclasspath)
8217
- self._extdirs = _filter_non_existant_paths(self._extdirs)
8218
- self._endorseddirs = _filter_non_existant_paths(self._endorseddirs)
8217
+ self._bootclasspath_unfiltered = self._bootclasspath
8218
+ self._bootclasspath = _filter_non_existant_paths(self._bootclasspath)
8219
+ self._extdirs = _filter_non_existant_paths(self._extdirs)
8220
+ self._endorseddirs = _filter_non_existant_paths(self._endorseddirs)
8221
+ else:
8222
+ self._bootclasspath = ''
8223
+ self._extdirs = None
8224
+ self._endorseddirs = None
8219
8225
self._classpaths_initialized = True
8220
8226
8221
8227
def __repr__(self):
@@ -8242,7 +8248,7 @@ def __cmp__(self, other):
8242
8248
8243
8249
def processArgs(self, args, addDefaultArgs=True):
8244
8250
"""
8245
- Return a list composed of the arguments specified by the -P, -J and -A options (in that order)
8251
+ Returns a list composed of the arguments specified by the -P, -J and -A options (in that order)
8246
8252
prepended to `args` if `addDefaultArgs` is true otherwise just return `args`.
8247
8253
"""
8248
8254
if addDefaultArgs:
@@ -8254,13 +8260,19 @@ def run_java(self, args, nonZeroIsFatal=True, out=None, err=None, cwd=None, time
8254
8260
return run(cmd, nonZeroIsFatal=nonZeroIsFatal, out=out, err=err, cwd=cwd, timeout=timeout, env=env)
8255
8261
8256
8262
def bootclasspath(self, filtered=True):
8263
+ """
8264
+ Gets the value of the ``sun.boot.class.path`` system property. This will be
8265
+ the empty string if this JDK is version 9 or later.
8266
+
8267
+ :param bool filtered: specifies whether to exclude non-existant paths from the returned value
8268
+ """
8257
8269
self._init_classpaths()
8258
8270
return _separatedCygpathU2W(self._bootclasspath if filtered else self._bootclasspath_unfiltered)
8259
8271
8260
- """
8261
- Add javadoc style options for the library paths of this JDK.
8262
- """
8263
8272
def javadocLibOptions(self, args):
8273
+ """
8274
+ Adds javadoc style options for the library paths of this JDK.
8275
+ """
8264
8276
self._init_classpaths()
8265
8277
if args is None:
8266
8278
args = []
@@ -8272,10 +8284,10 @@ def javadocLibOptions(self, args):
8272
8284
args.append(_separatedCygpathU2W(self._extdirs))
8273
8285
return args
8274
8286
8275
- """
8276
- Add javac style options for the library paths of this JDK.
8277
- """
8278
8287
def javacLibOptions(self, args):
8288
+ """
8289
+ Adds javac style options for the library paths of this JDK.
8290
+ """
8279
8291
args = self.javadocLibOptions(args)
8280
8292
if self._endorseddirs:
8281
8293
args.append('-endorseddirs')
@@ -9908,7 +9920,7 @@ def make_eclipse_launch(suite, javaArgs, jre, name=None, deps=None):
9908
9920
mainClass = '-jar'
9909
9921
appArgs = list(reversed(argsCopy))
9910
9922
break
9911
- if a == '-cp' or a == '-classpath' :
9923
+ if a in [ '-cp', '-classpath', '-mp', '-modulepath', '-limitmods', '-addmods', '-upgrademodulepath', '-m'] :
9912
9924
assert len(argsCopy) != 0
9913
9925
cp = argsCopy.pop()
9914
9926
vmArgs.append(a)
@@ -13603,7 +13615,7 @@ def alarm_handler(signum, frame):
13603
13615
# no need to show the stack trace when the user presses CTRL-C
13604
13616
abort(1)
13605
13617
13606
- version = VersionSpec("5.26.0 ")
13618
+ version = VersionSpec("5.26.1 ")
13607
13619
13608
13620
currentUmask = None
13609
13621
0 commit comments