Created
April 1, 2013 15:37
-
-
Save khannedy/5285634 to your computer and use it in GitHub Desktop.
AppPropConfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package eecchhoo.commons.config; | |
import org.apache.commons.configuration.ConfigurationException; | |
import org.apache.commons.configuration.PropertiesConfiguration; | |
import java.io.File; | |
/** | |
* @author Eko Kurniawan Khannedy | |
*/ | |
public class AppPropConfig { | |
static public void main(String[] args) throws ConfigurationException { | |
// membuat objek konfigurasi | |
PropertiesConfiguration configuration = new PropertiesConfiguration(); | |
// menambah konfigurasi | |
configuration.addProperty("app.width", 800); | |
configuration.addProperty("app.height", 640); | |
configuration.addProperty("app.title", "App Bla Bla Bla"); | |
configuration.addProperty("app.fullscreen", false); | |
// menyimpan konfigurasi | |
File file = new File("/Users/khannedy/Desktop/setting.properties"); | |
configuration.save(file); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment