예제 #1
0
 def create_JVM(self, **kwargs):
   # Note: don't be confused by the fact that the JVM subsystem happens to have an option
   # named 'options', which we set in several tests below.  We name this method's arguments
   # kwargs instead of options to reduce this confusion.
   self.context(for_subsystems=[JVM], options={
     JVM.options_scope: kwargs
   })
   return JVM.global_instance()
예제 #2
0
 def create_JVM(self, **kwargs):
   # Note: don't be confused by the fact that the JVM subsystem happens to have an option
   # named 'options', which we set in several tests below.  We name this method's arguments
   # kwargs instead of options to reduce this confusion.
   self.context(for_subsystems=[JVM], options={
     JVM.options_scope: kwargs
   })
   return JVM.global_instance()
예제 #3
0
    def search_path():
      try:
        for location in JVM.global_instance().get_jdk_paths():
          yield cls._Location.from_home(location)
      except SubsystemError:
        logger.warning('Java distribution requested before JVM subsystem initialized.')
        pass

      yield env_home('JDK_HOME')
      yield env_home('JAVA_HOME')

      for location in cls._linux_java_homes():
        yield location

      for location in cls._osx_java_homes():
        yield location

      search_path = os.environ.get('PATH')
      if search_path:
        for bin_path in search_path.strip().split(os.pathsep):
          yield cls._Location.from_bin(bin_path)
예제 #4
0
        def search_path():
            try:
                for location in JVM.global_instance().get_jdk_paths():
                    yield cls._Location.from_home(location)
            except SubsystemError:
                logger.warning(
                    'Java distribution requested before JVM subsystem initialized.'
                )
                pass

            yield env_home('JDK_HOME')
            yield env_home('JAVA_HOME')

            for location in cls._linux_java_homes():
                yield location

            for location in cls._osx_java_homes():
                yield location

            search_path = os.environ.get('PATH')
            if search_path:
                for bin_path in search_path.strip().split(os.pathsep):
                    yield cls._Location.from_bin(bin_path)