Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the simplest way to do settings files in Java?

Tags:

java

Obviously enough, I want to avoid hardcoding paths and such into my application, and as a result, I'd like to make a settings file that will store simple things like strings and such. What is the simplest way to do so? I was thinking something along the lines of how Cocoa uses object persistence, but I can't seem to find anything equivalent.

like image 609
alexgolec Avatar asked Jan 02 '11 19:01

alexgolec


1 Answers

You could use properties files which are manipulated with the java.util.Properties class.

like image 180
Darin Dimitrov Avatar answered Oct 06 '22 00:10

Darin Dimitrov