parameters: (env)
docstring: Add Builders and construction variables for jar to an Environment.
docstring_summary: Add Builders and construction variables for jar to an Environment.
docstring_tokens: Add Builders and construction variables for jar to an Environment .
function: def generate(env):
      """Add Builders and construction variables for jar to an Environment."""
      SCons.Tool.CreateJarBuilder(env)
  
      SCons.Tool.CreateJavaFileBuilder(env)
      SCons.Tool.CreateJavaClassFileBuilder(env)
      SCons.Tool.CreateJavaClassDirBuilder(env)
  
      env.AddMethod(Jar)
  
      if env['PLATFORM'] == 'win32':
          # Ensure that we have a proper path for jar
          paths = get_java_install_dirs('win32')
          jar = SCons.Tool.find_program_path(env, 'jar', default_paths=paths)
          if jar:
              jar_bin_dir = os.path.dirname(jar)
              env.AppendENVPath('PATH', jar_bin_dir)
  
      env['JAR']        = 'jar'
      env['JARFLAGS']   = SCons.Util.CLVar('cf')
      env['_JARFLAGS']  = jarFlags
      env['_JARMANIFEST'] = jarManifest
      env['_JARSOURCES'] = jarSources
      env['_JARCOM']    = '$JAR $_JARFLAGS $TARGET $_JARMANIFEST $_JARSOURCES'
      env['JARCOM']     = "${TEMPFILE('$_JARCOM','$JARCOMSTR')}"
      env['JARSUFFIX']  = '.jar'
function_tokens: def generate ( env ) : SCons . Tool . CreateJarBuilder ( env ) SCons . Tool . CreateJavaFileBuilder ( env ) SCons . Tool . CreateJavaClassFileBuilder ( env ) SCons . Tool . CreateJavaClassDirBuilder ( env ) env . AddMethod ( Jar ) if env [ 'PLATFORM' ] == 'win32' : # Ensure that we have a proper path for jar paths = get_java_install_dirs ( 'win32' ) jar = SCons . Tool . find_program_path ( env , 'jar' , default_paths = paths ) if jar : jar_bin_dir = os . path . dirname ( jar ) env . AppendENVPath ( 'PATH' , jar_bin_dir ) env [ 'JAR' ] = 'jar' env [ 'JARFLAGS' ] = SCons . Util . CLVar ( 'cf' ) env [ '_JARFLAGS' ] = jarFlags env [ '_JARMANIFEST' ] = jarManifest env [ '_JARSOURCES' ] = jarSources env [ '_JARCOM' ] = '$JAR $_JARFLAGS $TARGET $_JARMANIFEST $_JARSOURCES' env [ 'JARCOM' ] = "${TEMPFILE('$_JARCOM','$JARCOMSTR')}" env [ 'JARSUFFIX' ] = '.jar'