Java Preference writeReg2(String name, String value, Class clazz)

Here you can find the source of writeReg2(String name, String value, Class clazz)

Description

write Reg

License

LGPL

Declaration

public static void writeReg2(String name, String value, Class<?> clazz) 

Method Source Code


//package com.java2s;
//License from project: LGPL 

import java.util.prefs.Preferences;

public class Main {

    public static void writeReg2(String name, String value, Class<?> clazz) {
        Preferences prefsdemo = Preferences.systemNodeForPackage(clazz);
        try {/*from   www. j  a v a  2  s.co m*/
            prefsdemo.put(name, value);
        } catch (Exception e) {

        }
    }
}

Related

  1. initEnv(String key, String value)
  2. keyExists(String className, String prefName)
  3. readAllReg(String path)
  4. savePreference(String key, Object value)
  5. userNodeForClass(Class clazz)