|
FrameworksApplication frameworks present a challenge to tools like One-JAR because they are written with certain assumed behaviors about classloading which may not always be valid when running under the One-JAR ClassLoader. Because of extensive input from the One-JAR user community, release 0.97 now has extensive (possibly full) support for the following frameworks:
The configuration is controlled by a META-INF/MANIFEST.MF setting at the One-JAR top level which
names the factory implementation class that implements One-Jar-URL-Factory: com.simontuffs.onejar.JarClassLoader$OneJarURLFactoryOne-JAR supports custom generation of URL's based on a factory interface in the JarClassLoader: // Injectable URL factory. public static interface IURLFactory { public URL getURL(String codebase, String resource) throws MalformedURLException; public URL getCodeBase(String jar) throws MalformedURLException; }A factory must support getUrl(String codebase, String resource) , returning a URL for a resource
at a given codebase. It must also support getCodeBase(String jar) , returning a URL for a given codebase.
One-JAR comes pre-configured with two factories which return different kinds of URLs:
FileURL URL's are injected with a java.net.URLStreamHandler which
knows how to tear-apart the "jar:" protocol. FileURL is the best choice for SpringFramework
applications, which use "jar:" protocol URL's in their annotation scanners.
The OneJarUrlFactory URL's rely on the global
You can inject your own implementation of |
|
![]() |
![]() |
![]() |