AppservClassLoader loader = null;
try {
loader = new AppservClassLoader();
String installRoot = System.getProperty("com.sun.aas.installRoot");
if (installRoot == null) {
//set installRoot to current directory
installRoot = ".";
}
File f;
final String classpathPrefix = System.getProperty("com.sun.ant.classpath.prefix");
if (classpathPrefix != null) {
f = new File(classpathPrefix);
loader.addURL(f);
}
final String derbyRoot = System.getProperty("derby.root");
if (derbyRoot != null) {
//set derby jar file
f = new File (derbyRoot+"/lib/derby.jar");
loader.addURL(f);
}
f = new File(installRoot+"/lib");
loader.addURL(f);
f = new File(installRoot+"/lib/webservices-rt.jar");
loader.addURL(f);
f = new File(installRoot+"/lib/webservices-tools.jar");
loader.addURL(f);
f = new File(installRoot+"/lib/appserv-se.jar");
loader.addURL(f);
f = new File(installRoot+"/lib/appserv-admin.jar");
loader.addURL(f);
f = new File(installRoot+"/lib/appserv-ext.jar");
loader.addURL(f);
f = new File(installRoot+"/lib/appserv-rt.jar");
loader.addURL(f);
f = new File(installRoot+"/lib/appserv-cmp.jar");
loader.addURL(f);
f = new File(installRoot+"/lib/admin-cli.jar");
loader.addURL(f);
f = new File(installRoot+"/lib/commons-launcher.jar");
loader.addURL(f);
f = new File(installRoot+"/lib/javaee.jar");
loader.addURL(f);
f = new File(installRoot+"/lib/install/applications/jmsra/imqjmsra.jar");
loader.addURL(f);
}catch (Exception ex) {
ex.printStackTrace();
//throw new Exception(ex2.getLocalizedMessage());
}
return loader;