コード例 #1
0
ファイル: Irc.java プロジェクト: greg5813/projet-sysco
  public static void main(String argv[]) {

    if (argv.length != 1) {
      System.out.println("java Irc <name>");
      return;
    }
    myName = argv[0];

    // initialize the system
    Client.init();

    // look up the IRC object in the name server
    // if not found, create it, and register it in the name server
    Sentence_itf s = (Sentence_itf) Client.lookup("IRC");
    if (s == null) {
      s = (Sentence_itf) Client.create(new Sentence());
      Client.register("IRC", s);
    }
    // create the graphical part
    new Irc(s);
  }