Played around with Opera 7.1. Very nice rendering, but a little buggy. Horrible mail client. Uninstalled all older versions of Mozilla on my workstation and went with Mozilla 1.4a. Was an adventure.

Got rid of evolution. Love it, but it’s not GTK2 yet. The GTK2 beta is too unstable. It’s a shame because GTK2 rules.

Got some more functionality working on my side project “backUplink” which is a utility for Introversion’s hacking game “Uplink”. It backs up your character so you don’t lose your entire character. Very close to done.

Read on to see the Java source code to an Application Preferences storage class.

Here’s ConfigWorker.java. It reads and writes persistent storage which can be used to save app preferences/configurations. Like: “user’s last swear word = crapfully”. That way, the app knows what the user’s last swear word was when the app is started again (this is the persistance). :)

Package below needs to be changed if you want to use it (unless you like com.squarism …), make an empty file what is listed, run the main unit class and see how it works.

/*
 * Created on Apr 12, 2003
 *
 */
package com.squarism.backUplink;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties;

/**
 * @author chris
 *
 */
public class ConfigWorker {

  private File configFile;

  /**
   * @param string
   */
  public ConfigWorker(String string) {
    configFile = new File(string);;
  }

  /**
   * @param string
   * @param string2
   */
  public void writeConfig(String string, String string2) {
    Properties props = new Properties();
    try {
      props.load(new FileInputStream(configFile));
      props.setProperty(string, string2);
      //props.list(new PrintStream(new FileOutputStream(configFile)));
      props.store(new FileOutputStream(configFile), "header");
    } catch (FileNotFoundException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    }
  }

  /**
   * @return Properties object
   */
  public Properties readConfig() {
    Properties props = new Properties();
    try {
      props.load(new FileInputStream(configFile));
    } catch (FileNotFoundException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    }

    if (! props.isEmpty()){
      return props;
    }

    return null;
  }

  /**
   * Dirty Unit Test
   * @param args
   */

  public static void main(String[] args) {
    ConfigWorker configWorker;
    configWorker = new ConfigWorker("BackUplink.properties");
    configWorker.writeConfig("fileToMonitor", "/tmp/aFileToMonitor");
  }
}

Works fairly well. Be sure to change file paths and the like. Your mileage may vary.