private void addFileInfo(String label, File directory, Panel panel) { String absolutePath = directory.getAbsolutePath(); boolean accessible = false; if (directory.isDirectory()) { accessible = Files.isAccessibleDirectory(directory); } else { accessible = Files.isAccessibleFile(directory); } addInfo(label, absolutePath, toYesNo(accessible), panel); }
@Override protected void performInitialize() throws LoggingActivatorException { try { // First try to access the logging.properties in Limbus Engine's conf/ folder. File confDir = getOrFailConfigurationDirectory(); File logConfigOverride = new File(confDir, LOGGING_PROPERTIES); boolean override = isAccessibleFile(logConfigOverride); InputStream logConfig = null; if (override) { // Read from config file if accessible logConfig = new FileInputStream(logConfigOverride); } else { // Read the default logging configuration. logConfig = JDKLoggingActivator.class.getResourceAsStream("/" + LOGGING_PROPERTIES); } initializeJUL(logConfig); } catch (Exception e) { throw new LoggingActivatorException("Cannot initialize Java Utils Logging framework.", e); } }