Package java.util.prefs

Examples of java.util.prefs.Preferences.clear()


    try
    {
      final Enumeration keys = config.getConfigProperties();
      final Preferences pref = base.node(configPath);
      pref.clear();
      while (keys.hasMoreElements())
      {
        final String key = (String) keys.nextElement();
        final String value = config.getConfigProperty(key);
        if (value != null)
View Full Code Here


   public static Preferences loadArgs(String[] args) {
      try {
         // user: See $HOME/.java/.userPrefs
         // root: See /opt/j2sdk1.4.2_06/jre/.systemPrefs/prefs.xml
         Preferences prefs = Preferences.userRoot();
         prefs.clear();

         // ---- Database settings -----
         String driverClass = System.getProperty("jdbc.drivers", "org.hsqldb.jdbcDriver:oracle.jdbc.driver.OracleDriver:com.microsoft.jdbc.sqlserver.SQLServerDriver:org.postgresql.Driver");
         // String dbUrl = System.getProperty("db.url", "jdbc:oracle:thin:@localhost:1521:orcl");
         String dbUrl = System.getProperty("db.url", "jdbc:postgresql:test//localhost/test");
View Full Code Here

    * @return Configuration
    */
   public static Preferences loadArgs(String[] args) {
      try {
         Preferences prefs = Preferences.userRoot();
         prefs.clear();
         // String dbUrl = System.getProperty("db.url", "jdbc:oracle:thin:@localhost:1521:orcl");
         // String dbUser = System.getProperty("db.user", "system");

         String driverClass = System.getProperty("jdbc.drivers", "org.hsqldb.jdbcDriver:oracle.jdbc.driver.OracleDriver:com.microsoft.jdbc.sqlserver.SQLServerDriver:org.postgresql.Driver");
         String dbUrl = System.getProperty("db.url", "jdbc:postgresql:test//localhost/test");
View Full Code Here

   public static Preferences loadArgs(String[] args) {
      try {
         // user: See $HOME/.java/.userPrefs
         // root: See /opt/j2sdk1.4.2_06/jre/.systemPrefs/prefs.xml
         Preferences prefs = Preferences.userRoot();
         prefs.clear();

         // ---- Database settings -----
         String driverClass = System.getProperty("jdbc.drivers", "org.hsqldb.jdbcDriver:oracle.jdbc.driver.OracleDriver:com.microsoft.jdbc.sqlserver.SQLServerDriver:org.postgresql.Driver");
         String dbUrl = System.getProperty("db.url", "jdbc:oracle:thin:@localhost:1521:orcl");
         String dbUser = System.getProperty("db.user", "system");
View Full Code Here

    * @return Configuration
    */
   public static Preferences loadArgs(String[] args) {
      try {
         Preferences prefs = Preferences.userRoot();
         prefs.clear();
         // String dbUrl = System.getProperty("db.url", "jdbc:oracle:thin:@localhost:1521:orcl");
         // String dbUser = System.getProperty("db.user", "system");

         String driverClass = System.getProperty("jdbc.drivers", "org.hsqldb.jdbcDriver:oracle.jdbc.driver.OracleDriver:com.microsoft.jdbc.sqlserver.SQLServerDriver:org.postgresql.Driver");
         String dbUrl = System.getProperty("db.url", "jdbc:postgresql:test//localhost/test");
View Full Code Here

            // Store overridden definitions to Preferences.
            Preferences pre = Preferences.userNodeForPackage
                (net.sf.jabref.labelPattern.LabelPattern.class);
            try {
                pre.clear(); // We remove all old entries.
            } catch (BackingStoreException ex) {
                Globals.logger("BackingStoreException in JabRefPreferences.putKeyPattern");
            }

            for (String s: pattern.keySet()){
View Full Code Here

        public void save() {
            Preferences prefs = Preferences.userNodeForPackage(LogViewerFrame.class);
            prefs = prefs.node("loggerTable");

            try {
                prefs.clear();
            } catch (BackingStoreException ex) {
                logger.log(Level.WARNING, "Error clearing preferences", ex);
            }

            for (int i = 0; i < getRowCount(); i++) {
View Full Code Here

    try
    {
      final Enumeration keys = config.getConfigProperties();
      final Preferences pref = base.node(configPath);
      pref.clear();
      while (keys.hasMoreElements())
      {
        final String key = (String) keys.nextElement();
        final String value = config.getConfigProperty(key);
        if (value != null)
View Full Code Here

        System.out.println(prefs.getLong(WebCloudNameLookup.KEY_APPENGINECLOUD_SESSION_ID, 0));
        WebCloudNameLookup.clearSavedSessionInformation();

        prefs.flush();
        prefs.clear();
        prefs.flush();
    }

}
View Full Code Here

    }

    static void clear() {
        Preferences p = Preferences.userNodeForPackage(GUISaveState.class);
        try {
            p.clear();
        } catch (BackingStoreException e) {
            Debug.println(e);
        }
        instance = new GUISaveState();
    }
View Full Code Here

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.