Methods Summary |
---|
public static java.util.List | getClasspathAsBatchCommands()
List from = getClasspathAsList();
List to = new ArrayList();
boolean first = true;
for(Iterator iter = from.iterator(); iter.hasNext(); )
{
if(first)
{
to.add("set CLASSPATH=" + iter.next());
first = false;
}
else
to.add("set CLASSPATH=%CLASSPATH%;" + iter.next());
}
return to;
|
public static java.util.List | getClasspathAsList()
String cp = getClasspathAsString();
String ps = System.getProperty("path.separator");
StringTokenizer st = new StringTokenizer(cp, ps);
List list = new ArrayList();
while (st.hasMoreTokens())
{
list.add(st.nextToken());
}
return list;
|
public static java.util.List | getClasspathAsSortedList()
List list = getClasspathAsList();
Collections.sort(list, String.CASE_INSENSITIVE_ORDER);
return list;
|
public static java.lang.String | getClasspathAsString()
return System.getProperty("java.class.path");
|
public static void | main(java.lang.String[] args)
pr("****** CLASSPATH as String *******");
pr(getClasspathAsString());
pr("****** CLASSPATH as List *******");
pr(getClasspathAsList());
pr("****** CLASSPATH as Sorted List *******");
pr(getClasspathAsSortedList());
pr("****** CLASSPATH as Batch Commands *******");
pr(getClasspathAsBatchCommands());
|
private static void | pr(java.lang.String s)
System.out.println(s);
|
private static void | pr(java.util.List c)
for(Iterator iter = c.iterator(); iter.hasNext(); )
{
pr((String)iter.next());
}
|