⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prueba.java

📁 How To accede Windows registry with java. Example.
💻 JAVA
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package accesoregistro;import com.ice.jni.registry.*;import java.util.StringTokenizer;        /** * * @author TeimoyM */public class prueba {        public prueba(){        String appString = "";                RegistryKey skey = Registry.HKEY_CLASSES_ROOT;        RegistryKey mkey = Registry.HKEY_CLASSES_ROOT;        try{                    skey = skey.openSubKey("ext");        String tt = skey.getDefaultValue();        mkey = mkey.openSubKey(tt);        mkey = mkey.openSubKey("shell");        mkey = mkey.openSubKey("open");        mkey = mkey.openSubKey("command");        appString = mkey.getDefaultValue();        skey.closeKey();        mkey.closeKey();        appString = appString.replace('"',' ');        StringTokenizer st = new StringTokenizer(appString);        String sst;        StringBuffer ret = new StringBuffer();        ret.append((String)st.nextElement());        ret.append(" ");        while (st.hasMoreElements()) {            sst = (String) st.nextElement();            if ((sst.indexOf('%') == -1))                ret.append(sst + " ");        }        System.out.println(ret.toString());        }        catch(Exception e)        {            e.printStackTrace();        }    }    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -