Add properties file to build path of runnable jar

后端 未结 7 1649
無奈伤痛
無奈伤痛 2021-01-07 02:48

is it possible to add to the classpath of a runnable jar file some properties file? I tryed these solutions solutions:

  1. running the executable file using the

相关标签:
7条回答
  • 2021-01-07 03:17

    What worked for me is adding properties file in jar and put that jar in classpath in MANIFEST file (under Class-Path section).

    Somehow it didn't work when I pass that same jar under -cp option. Seems it always take classpath from MANIFEST file for runnable jar.

    0 讨论(0)
提交回复
热议问题