How do I access a config file inside the jar?

前端 未结 4 903
暗喜
暗喜 2020-11-29 12:30

I\'m using FlatPack to parse and load data from flat files. This requires loading a config file that stores mappings of the columns of the flat file.

I have a const

4条回答
  •  清歌不尽
    2020-11-29 13:15

    if it's inside a JAR, it's not a File, generally speaking. You should load the data using Class.getResourceAsStream(String), or something similar.

提交回复
热议问题