// get and set an ordinary property
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties;

// ...

Properties props = new Properties();
FileInputStream fis = new FileInputStream( "C:/temp/sample.properties" );
props.load( fis );
fis.close();
String desc = props.getProperty( "window.logo" );
out.println( desc );

// changing a property and saving the properties
props.setProperty( "window.logo","resources/sunLogo.png" );

FileOutputStream fos = new FileOutputStream( "C:/temp/updatedsample.properties" );
// saving will lose your comments, lose blank lines, and scramble the order.
props.store( fos, "sample properties with comments lost" );
fos.close();