This line
URL contexturl = Thread.currentThread().getContextClassLoader().getResource("ClassLoader/Test/someFile.xml");
gives me the following contexturl.toString()
string for the resource file someFile.xml
:
jfx://ClassLoader/Test/someFile.xml
What does this mean and how can I obtain the absolute file system path of the resource?
The problem is also that contexturl.getPath()
returns null
.
The someFile.xml
file is packaged in some jar file can be loaded as expected. However, I also want to load another file which is in the same folder of the jar but not packaged in the jar, so its external and therefore I need the file system path.
Any hints how to retrieve this path?