Java OutputStream equivalent to getClass().getClassLoader().getResourceAsStream()

后端 未结 4 1631
遇见更好的自我
遇见更好的自我 2021-01-04 01:14

I am attempting to store the change made to my application\'s properties. The .properties file is located in resources package, which is different

4条回答
  •  感情败类
    2021-01-04 01:34

    In addition to Carl's answer, if you're going to read and write to this file frequently, and expect that your application will expand in scope, consider whether to go one step (or several steps) further and use a file-based database like SQLite. There are a few JDBC wrappers for SQLite that would allow you to go beyond the basic string key-value lookup that the Java Properties interface provides.

提交回复
热议问题