themesDateien.add(themeFiles[i].toURL());
ZipFile jf = new ZipFile(themeFiles[i]); ZipEntry entry = jf.getEntry("skinlf-themepack.xml"); if (entry!=null){ themesDateien.add(themeFiles[i].toURL()); }
    public static void initThemes() {        try {            themesInitialized = true;            if (PropertiesManager.getOptionsManager().isThemesSupported()) {                HashSet themesDateien = new HashSet();                File themesPath = new File(System.getProperty("user.dir") +                                           File.separator + "themes");                if (!themesPath.isDirectory()) {                    closeWithErrormessage("Der Ordner" +                                          " fr die Themes zip-Dateien ist nicht vorhanden." +                                          "\r\nappleJuice wird beendet.", false);                }                File[] themeFiles = themesPath.listFiles();                for (int i = 0; i < themeFiles.length; i++) {                    if (themeFiles[i].isFile() &&                        themeFiles[i].getName().indexOf(".zip") != -1) {                        themesDateien.add(themeFiles[i].toURL());                    }                }                Iterator it = themesDateien.iterator();                Skin standardSkin = null;                Skin aSkin = null;                String temp;                String shortName = "";                String defaultTheme = PropertiesManager.getOptionsManager().                    getDefaultTheme();                while (it.hasNext()) {                    URL skinUrl = (URL) it.next();                    temp = skinUrl.getFile();                    int index1 = temp.lastIndexOf('/');                    int index2 = temp.lastIndexOf(".zip");                    if (index1 == -1 || index2 == -1) {                        continue;                    }                    shortName = temp.substring(index1 + 1, index2);                    aSkin = SkinLookAndFeel.loadThemePack(skinUrl);                    themes.put(shortName, aSkin);                    if (shortName.compareToIgnoreCase(defaultTheme) == 0) {                        standardSkin = aSkin;                    }                }                if (standardSkin == null) {                    standardSkin = aSkin;                }                SkinLookAndFeel.setSkin(standardSkin);                SkinLookAndFeel.enable();            }        }        catch (Exception e) {            if (logger.isEnabledFor(Level.ERROR)) {                logger.error("Unbehandelte Exception", e);            }        }    }