Loading an xml configuration file

An URL is not a file, only sometimes it might reference one. Hence when you try and create a File from that URL it fails if its not really referencing a file… Thats why I asked you if it happens when you create the URL (which it doesn’t as we now know).

If in exception was java.io.FileNotFoundException it can’t be URL yea? so i thinked its sure for you that it is not Exception while create URL just about Reference to File. Sorry :slight_smile:



I just known reference looks ok, just don’t known that it can’t read from Jar same as from folder

You can read from a file like from a jar, using an URL, just not using a File… Your assumption about when the error could occur and how its correlated to its name is wrong, it could happen in the URL constructor too, you didn’t post the whole stack, just the last exception.

Yes my fail, sorry again. I should just do testcase not giving single lines of code :slight_smile: