Question

I've never worked with the registry before and it seems a bit intimidating, as I know very little about it . I need to asses if any Blackberry emulators are installed, and get their location if found. I searched manually from regedit and found entries under HKEY_LOCAL_MACHINE -> SOFTWARE -> Research In Motion -> BlackBerry Device Simulators -> 5.0.0.423 -> 9700. Here, 5.0.0.423 is a version of the emulator and 9700 is a specific device. When clicking on the device name (9700) I can see some values, one of which is of interest to me:

Value name=InstallDir
Value data: C:\Program Files\Research In Motion\BlackBerry Smartphone Simulators 5.0.0\5.0.0.423 (9700)\

I need to use Java, targeting both 32 and 64 bit Windows systems and search if any emulators were installed, then save their names (such as 9700) and their location (C:\Program Files...) in a property file or whatever.

From what I read, it looks like I need to use the Preference class in java.util.prefs, however it looks like I can only access some part of the registry with it. I do not need to write anything, just read values. Is there anything you can suggest?

Thank you, Alex

Was it helpful?

Solution

have a look at http://lenkite.blogspot.com/2008/05/access-windows-registry-using-java.html - there is some sample code there you should be able to use.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top