def _tools_classpath(self):
    """Returns a classpath representing the (equivalent of the) `tools.jar`.

    If `javac` has been set explicitly, it is used. Otherwise, searches the current distribution.
    """

    javac_classpath = Java.global_javac_classpath(self.context.products)
    if javac_classpath:
      return javac_classpath

    self.set_distribution(jdk=True)
    jars = self.dist.find_libs(['tools.jar'])
    if len(jars) != 1:
      raise TaskError('Expected a single `tools.jar` entry for {}; got: {}'.format(
        self.dist, jars))
    return jars
Beispiel #2
0
    def _tools_classpath(self):
        """Returns a classpath representing the (equivalent of the) `tools.jar`.

    If `javac` has been set explicitly, it is used. Otherwise, searches the current distribution.
    """

        javac_classpath = Java.global_javac_classpath(self.context.products)
        if javac_classpath:
            return javac_classpath

        self.set_distribution(jdk=True)
        jars = self.dist.find_libs(['tools.jar'])
        if len(jars) != 1:
            raise TaskError(
                'Expected a single `tools.jar` entry for {}; got: {}'.format(
                    self.dist, jars))
        return jars
Beispiel #3
0
 def javac_classpath(self):
     # Note that if this classpath is empty then Zinc will automatically use the javac from
     # the JDK it was invoked with.
     return Java.global_javac_classpath(self.context.products)
Beispiel #4
0
 def javac_classpath(self):
   # Note that if this classpath is empty then Zinc will automatically use the javac from
   # the JDK it was invoked with.
   return Java.global_javac_classpath(self.context.products)