Reading/Writing to Properties Files inside the jar file

前端 未结 3 1744
庸人自扰
庸人自扰 2021-01-20 01:31

So i am getting back into writing Java after 4 years so please forgive any \"rookie\" mistakes.

I need to have a properties file where i can store some simple data f

3条回答
  •  半阙折子戏
    2021-01-20 02:18

    You should not be trying to write to "files" that exist inside of the jar file. Actually, technically, jar files don't hold files but rather they hold "resources", and for practical purposes, they are read-only. If you need to read and write to a properties file, it should be outside of the jar.

提交回复
热议问题