Guest User

Untitled

a guest
Jun 19th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. public string[] GetInstalledJavas() {
  2. // hold the registry subkeys that list the installed JRE's
  3. string[] jres = null;
  4. try {
  5. RegistryKey myKey = Registry.LocalMachine;
  6. myKey = myKey.OpenSubKey(@"SOFTWAREJavaSoftJava Plug-in"); // read-only
  7. jres = myKey.GetSubKeyNames();
  8. } catch (Exception myException) {
  9. Console.Writeline(myException.ToString());
  10. }
  11. return jres;
  12. }
Add Comment
Please, Sign In to add comment