Package at.jta

Examples of at.jta.Regor


        Map browsersAvailable = new TreeMap(String.CASE_INSENSITIVE_ORDER);
        try {
            // create map of exe names to win browser objects
            Map exesToBrowserObjs = getExeNamesToBrowsers(tempBrowsersToCheck);
            // access and look in registry
            Regor regor = new Regor();
            String subKeyName =
                    "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths";
            int key = regor.openKey(Regor.HKEY_LOCAL_MACHINE,
                                    subKeyName);
            if (key > -1) {
                List keys = regor.listKeys(key);
                Collections.sort(keys, String.CASE_INSENSITIVE_ORDER);
                Iterator keysIter = exesToBrowserObjs.keySet().iterator();
                while (keysIter.hasNext()) {
                    String exeKey = (String) keysIter.next();
                    int index = Collections.binarySearch(
View Full Code Here


            }
        } else {
            //On windows we can try to see the installed versions...
            List<File> foundVersions = new ArrayList<File>();
            try {
                Regor regor = new Regor();

                //The structure for Python is something as Software\\Python\\PythonCore\\2.6\\InstallPath
                for (Key root : new Key[] { Regor.HKEY_LOCAL_MACHINE, Regor.HKEY_CURRENT_USER }) {
                    Key key = regor.openKey(root, "Software\\Python\\PythonCore", Regor.KEY_READ);
                    if (key != null) {
                        try {
                            List l = regor.listKeys(key);
                            for (Object o : l) {
                                Key openKey = regor.openKey(key, (String) o + "\\InstallPath", Regor.KEY_READ);
                                if (openKey != null) {
                                    try {
                                        byte buf[] = regor.readValue(openKey, "");
                                        if (buf != null) {
                                            String parseValue = Regor.parseValue(buf);
                                            //Ok, this should be the directory where it's installed, try to find a 'python.exe' there...
                                            File file = new File(parseValue, "python.exe");
                                            if (file.isFile()) {
                                                foundVersions.add(file);
                                            }
                                        }
                                    } finally {
                                        regor.closeKey(openKey);
                                    }
                                }
                            }
                        } finally {
                            regor.closeKey(key);
                        }
                    }
                }

            } catch (Throwable e) {
View Full Code Here

        Map browsersAvailable = new TreeMap(String.CASE_INSENSITIVE_ORDER);
        try {
            // create map of exe names to win browser objects
            Map exesToBrowserObjs = getExeNamesToBrowsers(tempBrowsersToCheck);
            // access and look in registry
            Regor regor = new Regor();
            String subKeyName =
                    "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths";
            int key = regor.openKey(Regor.HKEY_LOCAL_MACHINE,
                                    subKeyName);
            if (key > -1) {
                List keys = regor.listKeys(key);
                Collections.sort(keys, String.CASE_INSENSITIVE_ORDER);
                Iterator keysIter = exesToBrowserObjs.keySet().iterator();
                while (keysIter.hasNext()) {
                    String exeKey = (String) keysIter.next();
                    int index = Collections.binarySearch(
View Full Code Here

TOP

Related Classes of at.jta.Regor

Copyright © 2018 www.massapicom. 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.