Create an appropriate type of class path element based on the
path element name.
File element = new File(elementSpec);
if (!element.isDirectory() &&
looksLikeZipName(elementSpec))
return new ZipFileClassPathElement(element);
else
return new DirectoryClassPathElement(element);