comparison mxtool/mx.py @ 14939:dd5095578b79

Always compile ClasspathDump.java to avoid class version problems
author Gilles Duboscq <duboscq@ssw.jku.at>
date Wed, 02 Apr 2014 14:11:26 +0200
parents 3de340bdb8d3
children 82971f397b94
comparison
equal deleted inserted replaced
14938:9d32e87ea98b 14939:dd5095578b79
1425 self.java_args += ['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=' + str(self.debug_port)] 1425 self.java_args += ['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=' + str(self.debug_port)]
1426 1426
1427 def _init_classpaths(self): 1427 def _init_classpaths(self):
1428 myDir = dirname(__file__) 1428 myDir = dirname(__file__)
1429 javaSource = join(myDir, 'ClasspathDump.java') 1429 javaSource = join(myDir, 'ClasspathDump.java')
1430 javaClass = join(myDir, 'ClasspathDump.class') 1430 subprocess.check_call([self.javac, '-d', myDir, javaSource])
1431 if not exists(javaClass) or getmtime(javaClass) < getmtime(javaSource):
1432 subprocess.check_call([self.javac, '-d', myDir, javaSource])
1433 self._bootclasspath, self._extdirs, self._endorseddirs = [x if x != 'null' else None for x in subprocess.check_output([self.java, '-cp', myDir, 'ClasspathDump']).split('|')] 1431 self._bootclasspath, self._extdirs, self._endorseddirs = [x if x != 'null' else None for x in subprocess.check_output([self.java, '-cp', myDir, 'ClasspathDump']).split('|')]
1434 if not self._bootclasspath or not self._extdirs or not self._endorseddirs: 1432 if not self._bootclasspath or not self._extdirs or not self._endorseddirs:
1435 warn("Could not find all classpaths: boot='" + str(self._bootclasspath) + "' extdirs='" + str(self._extdirs) + "' endorseddirs='" + str(self._endorseddirs) + "'") 1433 warn("Could not find all classpaths: boot='" + str(self._bootclasspath) + "' extdirs='" + str(self._extdirs) + "' endorseddirs='" + str(self._endorseddirs) + "'")
1436 1434
1437 def __hash__(self): 1435 def __hash__(self):