I have some legacy code that reads a configuration file from an existing jar, like:
URL url = SomeClass.class.getResource(\"/configuration.properties\");
//
It works with getresourceasstream because it is in the classpath, but it doesn't work with the URL maybe because the URL is not ok.
I don't know if the URL that getResource is creating is not ok, or there isn't a correct handler for the protocol (wouldn't it be file:jar:c:/myjar.jar!configuration.properties
or something by the like (with two colons?)