i runed a java code which is perfectly working and vmware server and client are connected and output is displayed.But when i convert it to servlet im geting no clas found exception of Managedentity.Can any one suggest me how to rectify it.Im pasting java code..please help me to convert it to servlet
package com.vmware.vim25.mo.samples; import java.net.URL; import com.vmware.vim25.*; import com.vmware.vim25.mo.*; public class HelloVM { public static void main(String[] args) throws Exception { long start = System.currentTimeMillis(); ServiceInstance si = new ServiceInstance(new URL("https://8.8.8.8/sdk"), "root", "password", true); long end = System.currentTimeMillis(); System.out.println("time taken:" + (end-start)); Folder rootFolder = si.getRootFolder(); String name = rootFolder.getName(); System.out.println("root:" + name); ManagedEntity[] mes = new InventoryNavigator(rootFolder).searchManagedEntities("VirtualMachine"); if(mes==null || mes.length ==0) { return; } VirtualMachine vm = (VirtualMachine) mes[0]; VirtualMachineConfigInfo vminfo = vm.getConfig(); VirtualMachineCapability vmc = vm.getCapability(); vm.getResourcePool(); System.out.println("Hello " + vm.getName()); System.out.println("GuestOS: " + vminfo.getGuestFullName()); System.out.println("Multiple snapshot supported: " + vmc.isMultipleSnapshotsSupported()); si.getServerConnection().logout(); } }