VMware Cloud Community
shenoyg
Contributor
Contributor

Unable to use ManagedObject types in JAVA

Hello,

I recently started using the JAVA API for vSphere Management and have setup my Java Development environment.

So far, I am able to connect to the vCenter and make some basic tasks like cloneVM, power on/off etc through the vimPort.cloneVmTask(...)

However, I am unable to use any of the ManagedObjects in my project. I would like to use objects such as VirtualMachine or HostSystem. As per the documentation I see a lot of methods in these classes which I think are very useful.

I have included the vim25.jar into my build path (downloaded from vSphere Web Client SDK and vSphere Management SDK) but still unable to get these classes.

Anyone has an idea what I am doing wrong? Anyone has a solution?

Thanks in advance

0 Kudos
1 Reply
shenoyg
Contributor
Contributor

So I found that I can use the VIJAVA jar to use the managed objects that I am looking for, but it turns out that it is an open source java plugin not officially supported by VMware. But the VMware documentation states that we can/are allowed to use the ManagedObject types. However I am still not able to use them directly from the "vSphere Management SDK" or "vSphere Web Client SDK"

Does any one have any ideas/suggestions?

0 Kudos