It can be useful to load a resource (image, text file, properties, KeyStore, ...) that is packaged inside a JAR. For this purpose, we can use the Class and ClassLoaders.
Suppose we have the following project structure :
program.jar
|
\-com
\-project
|
|-file.txt
\-Test.class
...