Is there a way to use java.util.Preferences under Windows without it using the Registry as the backend?

前端 未结 2 1385
情歌与酒
情歌与酒 2020-12-14 09:14

I want to use the java.util.Preferences API but I don\'t want my program to attempt to read or write to the Windows registry. How would I go about this?

2条回答
  •  有刺的猬
    2020-12-14 09:49

    It is always possible to extend java.util.prefs.AbstractPreferences.

    An alternative could be to use The Configuration package of Apache Commons allows you to read and write configuration data from/to different sources.

提交回复
热议问题