There are a number of ways that Java supports finding and opening resources:
- URL findResource(String resource) - returns a resource, or null if not found.
- Enumeration findResources(String resource) - returns an enumeration of resource URL's which match the given string.
- URL.openConnection() - opens a connection to a resource by its URL.
Nsys-Boot supports all of these mechanisms within the context of a Nsys-Boot archive file, which may contain Jar files that have duplicate resources.
Nsys-Boot defines a predictable order for classloading:
- The Nsys-Boot archive file
- System Loader (e.g. boot/nsys-daemon-main.jar)
- External JARs (added by system property nsys-boot.class.path)
- Parent classloader
Every Jar file has a required META-INF/MANIFEST.MF file. With more than one Jar inside a Nsys-Boot executable there will therefore be duplicates. Fortunately, this file is not a problem, since a normal Java application usually has many Jar files (or other codebases) on its classpath, meaning that it must use scanning to locate its own MANIFEST resources. Nsys-Boot will have no impact in this situation.