if (! BeanBoxFrame.getQuickStart()) {
Vector jarNames = getJarNames();
for (int i = 0; i < jarNames.size(); i++) {
String name = (String)jarNames.elementAt(i);
try {
addBeansInJar(name);
} catch (Throwable th) {
System.err.println(name + ": jar load failed: " + th);
th.printStackTrace();
}
}
}
// Vector jarNames = getJarNames();
private static Vector getJarNames() {
File cwd = new File(System.getProperty("user.dir"));
File pwd = new File(cwd.getParent());
File jars = new File(pwd, "jars");
if (! jars.isDirectory()) {
System.err.println(jars+" is not a directory!!");
}
Vector result = new Vector();
String names[];
names = jars.list(new FileExtension(".jar"));
for (int i=0; i<names.length; i++) {
result.addElement(jars.getPath() + File.separatorChar + names[i]);
}
names = jars.list(new FileExtension(".JAR"));
for (int i=0; i<names.length; i++) {
result.addElement(jars.getPath() + File.separatorChar + names[i]);
}
// addBeansInJar(name);
synchronized void addBeansInJar(String jarFile) throws IOException {
JarLoader.loadJarDoOnBean(jarFile, helper);
doLayout();
} |