I am running java application in docker container as executable jar. For example
$ java -jar MyApp.jar
This application refers the application resource files from class path. Since application resource files different for each environment, I am mounting the application resource files to the Kubernates pod for each environment separately. My application needs to refer this external mounted path for the application resources during the run time. After googling I found that -cp is ignored when we run as executable jar. For Example,
$ java -cp /app/resource -jar MyApp.jar
This does not work as -cp is ignored for the executable jar.
Please let me know if we have any other option. Thanks
Note: Though this is Spring Boot application, this app does not support profile based running due to framework used in the application. Application resource files I am referring are not spring boot related resource files.