windows2008 64bit里使用j-interop访问WMI有问题
最近研究WINDOWS2008 下的HYPER-V,通过JAVA创建虚拟机.首先要通过JAVA远程调用WINDOWS2008的WMI,执行WMI里的SQL才可以.开源项目j-interop据说可以实现.按照提供的README.HTML配置,出现错误如下:
Recieved FAULT
org.jinterop.dcom.common.JIException: Access is denied, please check whether the [domain-username-password] are correct. Also, if not already done please check the GETTING STARTED and FAQ sections in readme.htm. They provide information on how to correctly configure the Windows machine for DCOM access, so as to avoid such exceptions. [0x00000005]
请问有没有遇到这样的问题的?
[解决办法]
楼主你好...我刚刚解决了这个问题..
按照下面步骤操作即可
1. Login to the target remote host as an Administrator.
2. Run the program Regedit
3. If you are asked to allow the Regedit program to make changes to the computer, click 'Yes'
4. Navigate to the Registry item HKEY_CLASSES_ROOT\CLSID\{YOUR CLSID HERE}
5. Right click on this item and select 'Permissions'
6. Click 'Advanced'
7. Select the 'Owner' tab
8. In the 'Change Owner to...' box, highlight the account you are currently logged in as.
9. Click 'Ok'
10. Click 'Ok'
11. Right click the registry item again and select 'Permissions'
12. Highlight the 'Administrators' group
13. Give 'Full Control' permissions to this group by checking the 'Allow' box
14. Click 'Ok'
1. Login to the target remote host as an Administrator.
2. Run the program Regedit
3. If you are asked to allow the Regedit program to make changes to the computer, click 'Yes'
4. Navigate to the Registry item HKEY_CLASSES_ROOT\CLSID\{YOUR CLSID HERE}
5. Right click on this item and select 'Permissions'
6. Click 'Advanced'
7. Select the 'Owner' tab
8. In the 'Change Owner to...' box, highlight the account you are currently logged in as.
9. Click 'Ok'
10. Click 'Ok'
11. Right click the registry item again and select 'Permissions'
12. Highlight the 'Administrators' group
13. Give 'Full Control' permissions to this group by checking the 'Allow' box
14. Click 'Ok'
1. Login to the target remote host as an Administrator.
2. Run the program Regedit
3. If you are asked to allow the Regedit program to make changes to the computer, click 'Yes'
4. Navigate to the Registry item HKEY_CLASSES_ROOT\CLSID\{YOUR CLSID HERE}
5. Right click on this item and select 'Permissions'
6. Click 'Advanced'
7. Select the 'Owner' tab
8. In the 'Change Owner to...' box, highlight the account you are currently logged in as.
9. Click 'Ok'
10. Click 'Ok'
11. Right click the registry item again and select 'Permissions'
12. Highlight the 'Administrators' group
13. Give 'Full Control' permissions to this group by checking the 'Allow' box
14. Click 'Ok'
CLSID是 76A6415B-CB41-11d1-8B02-00600806D9B6.