jodd-joy/src/main/java/jodd/joy/JoyPaths.java
@Override
	public void start() {
		initLogger();

		final String resourceName = StringUtil.replaceChar(JoyPaths.class.getName(), '.', '/') + ".class";

		URL url = ClassLoaderUtil.getResourceUrl(resourceName);

		if (url == null) {
			throw new JoyException("Failed to resolve app dir, missing: " + resourceName);
		}
		final String protocol = url.getProtocol();

		if (!protocol.equals("file")) {
			try {
				url = new URL(url.getFile());
			} catch (MalformedURLException ignore) {
			}
		}

		appDir = url.getFile();

		final int ndx = appDir.indexOf("WEB-INF");

		appDir = (ndx > 0) ? appDir.substring(0, ndx) : SystemUtil.info().getWorkingDir();

		System.setProperty(APP_DIR, appDir);

		log.info("Application folder: " + appDir);
	}
@Override
	public void start() {
		initLogger();

		final String resourceName = StringUtil.replaceChar(JoyPaths.class.getName(), '.', '/') + ".class";

		URL url = ClassLoaderUtil.getResourceUrl(resourceName);

		if (url == null) {
			throw new JoyException("Failed to resolve app dir, missing: " + resourceName);
		}
		final String protocol = url.getProtocol();

		if (!protocol.equals("file")) {
			try {
				url = new URL(url.getFile());
			} catch (MalformedURLException ignore) {
			}
		}

		appDir = url.getFile();

		final int ndx = appDir.indexOf("WEB-INF");

		appDir = (ndx > 0) ? appDir.substring(0, ndx) : SystemUtil.info().getWorkingDir();

		System.setProperty(APP_DIR, appDir);

		log.info("Application folder: " + appDir);
	}
@ Override public void start ( ) { initLogger ( ) ; final String resourceName = StringUtil . replaceChar ( JoyPaths . class . getName ( ) , ' ' , ' ' ) + ".class" ; URL url = ClassLoaderUtil . getResourceUrl ( resourceName ) ; if ( url == null ) { throw new JoyException ( "Failed to resolve app dir, missing: " + resourceName ) ; } final String protocol = url . getProtocol ( ) ; if ( ! protocol . equals ( "file" ) ) { try { url = new URL ( url . getFile ( ) ) ; } catch ( MalformedURLException ignore ) { } } appDir = url . getFile ( ) ; final int ndx = appDir . indexOf ( "WEB-INF" ) ; appDir = ( ndx > 0 ) ? appDir . substring ( 0 , ndx ) : SystemUtil . info ( ) . getWorkingDir ( ) ; System . setProperty ( APP_DIR , appDir ) ; log . info ( "Application folder: " + appDir ) ; }
---------------------------------------------------------------- lifecycle
---------------------------------------------------------------- lifecycle