}
protected void setUp() {
this.glob = Global.instance();
URLClassLoader cl = (URLClassLoader)this.getClass().getClassLoader();
URL[] urls = cl.getURLs();
String path = "";
for( int i = 0; i < urls.length; i++ ) {
String file = urls[i].getFile();
// TODO: parser.jar is not used anymore, remove code below
if( file.endsWith("parser.jar") ) {
int pos = file.indexOf("parser.jar");
path = urls[i].getProtocol()+"://"+file.substring(0,pos);
break;
}
}
// Add a xerces.jar at the beginning, so that CLASSPATH contains another XML-Parser in front.
try {
urls = new URL[2];
urls[0] = new URL(path+"ant/xerces.jar");
urls[1] = new URL(path+"xmlBlaster.jar");
}
catch (MalformedURLException ex) {
log.severe("error. >>>"+ex.toString());
}
cl = cl.newInstance(urls);
try {
Class clazz = cl.loadClass("org.xmlBlaster.util.EmbeddedXmlBlaster");
}
catch (ClassNotFoundException ex) {
assertTrue(ex.getMessage(), true);
}