My classloader resolves resources for a source that does not have a url handler, for example, it gets resources from a database. This, of course, creates a problem for ClassLoader.getResource (String), which returns a URL. For working with URL.openConnection (), etc. I need a protocol handler that creates an additional problem. How can cna map the URL to the data provider without installing a special Url protocol handler, which requires me to set the system property at startup. The problem with url protocol handlers is that they are static and must be installed at startup, while my class loaders are dynamic and can come from many places.
Is there a way to solve this problem without using a protocol handler?
source share