Loading a resource in a JAR file
<p>I have a Java project in Netbeans. It runs fine with Maven. So I assembled it. It contains the following code to load a file that is in the JAR:</p>

<pre><code>ClassLoader loader = MyClass.class.getClassLoader();
SERVICE_URL = loader.getResource("my.wsdl");
</code></pre>

<p>This returns a URL like:</p>

<pre><code>jar:file:/path/to/my/file/MyClass-1.0-SNAPSHOT-jar-with-dependencies.jar!/my.wsdl
</code></pre>

<p>but the library that needs this parameter doesn't appear to be able to use it.</p>

<p>Is there any way this file can be in the JAR and be referred to from the code like this?</p>
