/*
** Der ResourceProxy muss innerhalb des Scopes des ClassLoaders sein,
** da anderfalls der Proxy vom GC eventuell schon freigegeben wurde und
** die aus dem Archive gezogenen Resourcen schon weg sind.
*/
ResourceProxy resourceProxy = null;
if ( atts != null ) {
String jarFiles = (String) atts.get( "archive" );
String codeBase = (String) atts.get( "codeBase" );
String useMain = (String) atts.get( "useMain" );
workDir = (String) atts.get( "workDir" );
if ( codeBase != null ) {
URL url = new URL( codeBase );
if (url.getProtocol().equals("file")) {
pLoader = ClassContextProxy.create(url, null, null); // Security ausschalten
}
else {
pLoader = ClassContextProxy.create(url, null, null);
}
}
else if ( jarFiles != null ) {
try {
pLoader = ClassContextProxy.create(new URL("http://"), null, null);
}
catch(MalformedURLException e) {}
}
if (useMain != null) {
bDoMain = true;
}
if( jarFiles != null ) {
StringTokenizer st = new StringTokenizer(jarFiles, ",", false);
while (st.hasMoreTokens()) {
String tok = st.nextToken().trim();
try {
resourceProxy = ResourceProxy.load(new URL(pLoader.getBase(), tok), null);
resourceProxy.loadJar(pLoader.getBase());
}
catch(java.io.IOException iOException) {
System.err.println("Archive not found:" + iOException);
}
}