我写的报异常:RegistryKey r = new RegistryKey(RootKey.HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\");   
if(r.hasSubkeys()) {    
Iterator i = r.subkeys(); 
int count=1;
   while(i.hasNext()) {        
  RegistryKey x = (RegistryKey)i.next();   
//System.out.println(x.getName().toString());


 // System.load("jRegisTryKey");
if(x.hasValue("DisplayName"))
     {
   System.out.println("软件名称:"+x.getValue("DisplayName").toString());
       System.out.println("版本号:"+x.getValue("DisplayVersion")); 
      System.out.println("卸载路径为:"+x.getValue("UninstallString"));
      System.out.println("------------------------------------"+(count++)); 
    
      
     }
     }
 } 
java