Can I use the classpath to override a file in a jar that is being run?

后端 未结 4 651
情深已故
情深已故 2020-12-18 19:45

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

4条回答
  •  长情又很酷
    2020-12-18 20:22

    It may not be possible using just the CLASSPATH. There are ways to get make the call to ClassLoader.getResource() use a static path to find the resource. If it is doing that, it is bypassing the CLASSPATH.

提交回复
热议问题