parameters: (java, jvm_flags, j2objc, main_class, j2objc_args)
docstring: Runs J2ObjC transpiler to translate Java source files to ObjC.
  
    Args:
      java: The path of the Java executable.
      jvm_flags: A comma-separated list of flags to pass to JVM.
      j2objc: The deploy jar of J2ObjC.
      main_class: The J2ObjC main class to invoke.
      j2objc_args: A list of args to pass to J2ObjC transpiler.
    Returns:
      None.
docstring_summary: Runs J2ObjC transpiler to translate Java source files to ObjC.
docstring_tokens: Runs J2ObjC transpiler to translate Java source files to ObjC .
function: def RunJ2ObjC(java, jvm_flags, j2objc, main_class, j2objc_args):
    """Runs J2ObjC transpiler to translate Java source files to ObjC.
  
    Args:
      java: The path of the Java executable.
      jvm_flags: A comma-separated list of flags to pass to JVM.
      j2objc: The deploy jar of J2ObjC.
      main_class: The J2ObjC main class to invoke.
      j2objc_args: A list of args to pass to J2ObjC transpiler.
    Returns:
      None.
    """
    source_files, flags = _ParseArgs(j2objc_args)
    source_file_manifest_content = ' '.join(source_files)
    fd = None
    param_filename = None
    try:
      fd, param_filename = tempfile.mkstemp(text=True)
      os.write(fd, source_file_manifest_content)
    finally:
      if fd:
        os.close(fd)
    try:
      j2objc_cmd = [java]
      j2objc_cmd.extend(filter(None, jvm_flags.split(',')))
      j2objc_cmd.extend(['-cp', j2objc, main_class])
      j2objc_cmd.extend(flags)
      j2objc_cmd.extend(['@%s' % param_filename])
      subprocess.check_call(j2objc_cmd, stderr=subprocess.STDOUT)
    finally:
      if param_filename:
        os.remove(param_filename)
function_tokens: def RunJ2ObjC ( java , jvm_flags , j2objc , main_class , j2objc_args ) : source_files , flags = _ParseArgs ( j2objc_args ) source_file_manifest_content = ' ' . join ( source_files ) fd = None param_filename = None try : fd , param_filename = tempfile . mkstemp ( text = True ) os . write ( fd , source_file_manifest_content ) finally : if fd : os . close ( fd ) try : j2objc_cmd = [ java ] j2objc_cmd . extend ( filter ( None , jvm_flags . split ( ',' ) ) ) j2objc_cmd . extend ( [ '-cp' , j2objc , main_class ] ) j2objc_cmd . extend ( flags ) j2objc_cmd . extend ( [ '@%s' % param_filename ] ) subprocess . check_call ( j2objc_cmd , stderr = subprocess . STDOUT ) finally : if param_filename : os . remove ( param_filename )