Package net.sphene.goim.rcp.test

Source Code of net.sphene.goim.rcp.test.RegistryTest

/*
* File    : RegistryTest.java
* Created : 27.12.2005
* By      : kahless
*
* Gamer's Own Instant Messenger
* Copyright (C) 2005 Herbert Poul (kahless@sphene.net)
* http://goim.sphene.net
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
*/
package net.sphene.goim.rcp.test;

import java.util.Iterator;

import ca.beq.util.win32.registry.RegistryKey;
import ca.beq.util.win32.registry.RegistryValue;
import ca.beq.util.win32.registry.RootKey;

public class RegistryTest {
  public RegistryTest() {
    /*
    String[] cmd = cmdstring.split("((?<=\\\\)\"| )");
    for(String c : cmd) {
      System.out.println(" - '" + c + "'");
    }
    */
    System.out.println("...");
    //RegistryKey r = new RegistryKey(RootKey.HKEY_CURRENT_USER, "Software\\US Army\\America's Army\\Operations");
    RegistryKey r = new RegistryKey(RootKey.HKEY_LOCAL_MACHINE, "Software\\US Army\\America's Army\\Operations");
    if(r.hasValue("InstallDir")) {
       RegistryValue v = r.getValue("InstallDir");
       System.out.println(v.toString() + " ... " + v.getData());
    }
    if(r.hasSubkeys()) {
       Iterator i = r.subkeys();
       while(i.hasNext()) {
          RegistryKey x = (RegistryKey)i.next();
          System.out.println(x.toString());
       } // while
    } // if
  }

  /**
   * @param args
   */
  public static void main(String[] args) {
    new RegistryTest();
  }

}
TOP

Related Classes of net.sphene.goim.rcp.test.RegistryTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.