I have a JAR file that contains an application as well as configuration files for that application. The application loads configuration files from the classpath (using
Why not just invoke the application without specifying -jar and instead name the application main class explicitly? This will allow you to put both your new-config and the application.jar on the classpath in the required order:
e.g. (assuming "new-config" is a directory containing the overridden properties file)
java -cp new-config:application.jar Application.Main.Class
I believe the name of main class can be found in the MANIFEST.MF file inside the jar ....