I built a spring-boot application and make the jar file exectuable. There is a compileOnly dependency on my project which need to be provided at runtime. When I run java -jar myApp.jar I will get ClassNotFound exeception which is expected. But I don't know how to add the additional jar file on java command. I have tried below command:
java -Dloader.path=/libs/third.jar -jar myApp.jar but it doesn't work. How can I add /libs/third.jar on my application?