I am posting this question because I have not been able to understand what I have to do in order to load a resource file from my java project.
the structure is the following one:
and what I want to do is to load boletinoficial.wsdl
file in order to get the URL.
I have tried several ways to do that: getClass.getClassLoader.getResource()
, getClass.getResource()
, with absolute paths, with relative paths. But always getting null or exceptions. I also added src
folder to the build path but no success.
Is there any easy way to load that file?
EDIT
ok. and now that I have the structure,
how do I load the resource boletinoficial.wsdl
from the class App.java?
If you want to load a Resource, you should put them in src/main/resources
, as they'd be ignored in src/main/java