Say log.properties
is in the test.jar
. I would like to specify the file parameter using some file inside the jar, is this doable?
-DLog=target/classes/log.properties
Though question is not that clear to me, I will try to answer:
If you have are loading your parameter'd file with:
getClass().getClassLoader().getResourceAsStream(fileParameter);
then even if your file is inside jar (in classpath) it should work. And you should be able to pass parameter something as -DLog=log.properties
, so that it will search all the possible paths in classpath.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.