import java.io.*;
import java.util.Properties;

public class WriteProperties{
  public static void main( String[] args ) {

    if( args.length != 1 ) {
      System.err.println( "Error, usage \"java WriteProperties <file>\". Bailing out..." );
    }
    else {
      try {
	FileOutputStream fos = new FileOutputStream( args[0] );
	Properties properties = System.getProperties();
	properties.store( fos, "Header text." );
      } catch( Exception exception )
      {
	System.err.println( exception );
      }
    } 
  }
}

/* ********************** EOF ********************** */
