Package org.wso2.carbon.bootstrap
Class Bootstrap
- java.lang.Object
-
- org.wso2.carbon.bootstrap.Bootstrap
-
- Direct Known Subclasses:
CheckinClientBootstrap
public class Bootstrap extends Object
The bootstrap class used for bootstrapping a Carbon server in standalone mode. Added this mainly to support child-first classloading for webapps See http://frank.zinepal.com/embedded-tomcat-class-loading-trickery See http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html
-
-
Constructor Summary
Constructors Constructor Description Bootstrap()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddClassPathEntries()protected voidaddFileUrl(File file)Add a given file or directory to the list of URLs.protected voidaddJarFileUrls(File root)Add JAR files found in the given directory to the list of URLs.protected StringgetClassToLoad()protected StringgetMethodToInvoke()protected voidloadClass(String[] args)static voidmain(String[] args)
-
-
-
Field Detail
-
ROOT
protected static final String ROOT
-
-
Method Detail
-
main
public static void main(String[] args)
-
loadClass
protected final void loadClass(String[] args)
-
addClassPathEntries
protected void addClassPathEntries() throws MalformedURLException- Throws:
MalformedURLException
-
addFileUrl
protected final void addFileUrl(File file) throws MalformedURLException
Add a given file or directory to the list of URLs.- Parameters:
file- the directory to recursively search for JAR files.- Throws:
MalformedURLException- If a provided JAR file URL is malformed
-
addJarFileUrls
protected final void addJarFileUrls(File root) throws MalformedURLException
Add JAR files found in the given directory to the list of URLs.- Parameters:
root- the directory to recursively search for JAR files.- Throws:
MalformedURLException- If a provided JAR file URL is malformed
-
getClassToLoad
protected String getClassToLoad()
-
getMethodToInvoke
protected String getMethodToInvoke()
-
-