So i am trying to add a .ini file to my code and read it using ini4j. It works completely fine untill i try to build it into a jar, then it fails. I get the error stated above and i have no idea why. The file is in the root directory of the jar so there is no issue there.
Code where it fails:
Ini file = new Ini(new File(getClass().getResource("/Settings.ini").toExternalForm()));
Does anyone understand why this is happening and what must be done to solve it?
Thanks