app/src/main/java/org/sakaiproject/nakamura/app/NakamuraMain.java
private static String getSlingHome(Map<String, String> commandLine) {
		String source = null;

		String slingHome = commandLine.get("c");
		if (slingHome != null) {

			source = "command line";

		} else {

			slingHome = System.getProperty(SharedConstants.SLING_HOME);
			if (slingHome != null) {

				source = "system property sling.home";

			} else {

				slingHome = System.getenv(ENV_SLING_HOME);
				if (slingHome != null) {

					source = "environment variable SLING_HOME";

				} else {

					source = "default";
					slingHome = SharedConstants.SLING_HOME_DEFAULT;

				}
			}
		}
		System.setProperty(SharedConstants.SLING_HOME, slingHome);

		info("Setting sling.home=" + slingHome + " (" + source + ")", null);
		return slingHome;
	}
private static String getSlingHome(Map<String, String> commandLine) {
		String source = null;

		String slingHome = commandLine.get("c");
		if (slingHome != null) {

			source = "command line";

		} else {

			slingHome = System.getProperty(SharedConstants.SLING_HOME);
			if (slingHome != null) {

				source = "system property sling.home";

			} else {

				slingHome = System.getenv(ENV_SLING_HOME);
				if (slingHome != null) {

					source = "environment variable SLING_HOME";

				} else {

					source = "default";
					slingHome = SharedConstants.SLING_HOME_DEFAULT;

				}
			}
		}
		System.setProperty(SharedConstants.SLING_HOME, slingHome);

		info("Setting sling.home=" + slingHome + " (" + source + ")", null);
		return slingHome;
	}
private static String getSlingHome ( Map < String , String > commandLine ) { String source = null ; String slingHome = commandLine . get ( "c" ) ; if ( slingHome != null ) { source = "command line" ; } else { slingHome = System . getProperty ( SharedConstants . SLING_HOME ) ; if ( slingHome != null ) { source = "system property sling.home" ; } else { slingHome = System . getenv ( ENV_SLING_HOME ) ; if ( slingHome != null ) { source = "environment variable SLING_HOME" ; } else { source = "default" ; slingHome = SharedConstants . SLING_HOME_DEFAULT ; } } } System . setProperty ( SharedConstants . SLING_HOME , slingHome ) ; info ( "Setting sling.home=" + slingHome + " (" + source + ")" , null ) ; return slingHome ; }
Define the sling.home parameter implementing the algorithme defined on
the wiki page to find the setting according to this algorithm:
<ol>
<li>Command line option <code>-c</code></li>
<li>System property <code>sling.home</code></li>
<li>Environment variable <code>SLING_HOME</code></li>
<li>Default value <code>sling</code></li>
</ol>

@param args
The command line arguments
@return The value to use for sling.home
Define the sling . home parameter implementing the algorithme defined on the wiki page to find the setting according to this algorithm : <ol > <li > Command line option <code > - c< / code > < / li > <li > System property <code > sling . home< / code > < / li > <li > Environment variable <code > SLING_HOME< / code > < / li > <li > Default value <code > sling< / code > < / li > < / ol >