Typically, property files are intended to be deployed / modified without rebuilding the jar, for example. environment / external resources, so they are stored separately.
But if you need to keep them inside, make sure that (in your case) "configs / myapp.properties" is at the root JAR server level. Just open this jar that you created to see what's there. Or you can run:
jar -tvf your.jar | grep myapp.properties
to see the actual path in the JAR without sharing it.
If it is, you can load them through the classloader as follows:
ClassLoader cl = YourClass.class.getClassLoader() config = new PropertiesConfiguration( cl.getResourceAsStream( "configs/myapp.properties" ) ) );
source share