StringBuffer sb = new StringBuffer();
sb.append("\nDate: " + DateFormat.getDateInstance().format(new Date()));//$NON-NLS-1$
sb.append( LINE_SEPARATOR );
Map pathResults = new HashMap();
List reversetList = new ArrayList();
String separator = System.getProperty( "path.separator" ); //$NON-NLS-1$
StringTokenizer path = new StringTokenizer( classPath, separator );
while(path.hasMoreTokens()){
String pathElement = path.nextToken();
File pathFile = new File( pathElement );
if (pathFile.exists()) {
// if (resourceExistInClassPath(pathElement)) {
pathResults.put(pathElement, Boolean.TRUE);
} else {
pathResults.put(pathElement, Boolean.FALSE);
}
reversetList.add(pathElement);
}
sb.append("Classpath Information" ); //$NON-NLS-1$
sb.append( LINE_SEPARATOR );
sb.append("CLASSPATH: "); //$NON-NLS-1$
sb.append(classPath);
sb.append( LINE_SEPARATOR );
sb.append( LINE_SEPARATOR );
Iterator iter = reversetList.iterator();
sb.append("---- Classpath Entries ----"); //$NON-NLS-1$
sb.append( LINE_SEPARATOR );
while ( iter.hasNext() ) {
String epath = (String) iter.next();
Boolean doesExist = (Boolean) pathResults.get(epath);
sb.append(epath);
if (!doesExist.booleanValue()) {
sb.append(" (MISSING)");//$NON-NLS-1$
}
sb.append( LINE_SEPARATOR );