/** * Build the J2EEApplication name. * @param pUrl The URL of Ear file * @return The J2EEApplication name */ public static String fromURL(final URL pUrl) { String sName = null; try { sName = new File(pUrl.getFile()).getName(); if ("file".equals(pUrl.getProtocol())) { sName = fromFileName(sName); } } catch (NullPointerException e) { logger.log(BasicLevel.DEBUG, "Can't build j2ee application", e); } return sName; }