How do you store a file inside a jar library?
Setup : Create a simple maven project with a class that loads something from the resources folder using the getResoruceAsStream() method and a test that runs it. The test will fail with the problem being it couldn't find that file, the same issue will appear later when we try to compile it as a lib and run that class.
The problem : Using the only method I know (and the only that you can find on the web) getResourceAsStream()
will give you a null reference exception, because the file is missing. So how do I add the file to the jar and load it later?