public static String buildClasspathString(List<String> classpathEntries){
  StringBuilder sb=new StringBuilder();
  boolean needsSeparator=false;
  for (  String classpathEntry : classpathEntries) {
    if (needsSeparator) {
      sb.append(File.pathSeparatorChar);
    }
    needsSeparator=true;
    sb.append(classpathEntry);
  }
  return sb.toString();
}

public static String buildClasspathString ( List < String > classpathEntries ) { StringBuilder sb = new StringBuilder ( ) ; boolean needsSeparator = false ; for ( String classpathEntry : classpathEntries ) { if ( needsSeparator ) { sb . append ( File . pathSeparatorChar ) ; } needsSeparator = true ; sb . append ( classpathEntry ) ; } return sb . toString ( ) ; }
builds a classpath string with the correct separator from a list of paths .
