Here you can find the source of writeReg2(String name, String value, Class> clazz)
public static void writeReg2(String name, String value, Class<?> clazz)
//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) { } } }