0

Can anyone help fixing this code?

I entered this code for Java: import java.net.URL import com.vmware.vim25.* import com.vmware.vim25.mo.* def start = System.currentTimeMillis() def si = new ServiceInstance(new URL("https://HelloVM.groovy/sdk"), "administrator", "HelloVM.groovy", true) def end = System.currentTimeMillis() println "time taken: " + (end-start) def rootFolder = si.getRootFolder() def name = rootFolder.getName() println "root: " + name def mes = new InventoryNavigator(rootFolder).searchManagedEntities("VirtualMachine") mes.each { println "\nHello " + it.getName() println "GustOS: " + it.getConfig().getGuestFullName() println "Multiple snapshots supported?: " + it.getCapability().isMultipleSnapshotsSupported() } si.getServerConnection().logout() And I got this error: error: file not found: /usercode/*.java Usage: javac <options> <source files> use --help for a list of possible options Can anyone help fixing it?

4th Feb 2020, 11:13 PM
Thiago
Thiago - avatar
2 odpowiedzi
+ 2
https://code.sololearn.com/cdYMc3leAydU/?ref=app Also post your code link here instead of posting whole code👍 P.s this code won't work on Sololearn.
5th Feb 2020, 2:16 PM
$hardul B
$hardul B - avatar
+ 1
javac filename.java That's how you write javac... I think you did a mistake with javac.. Also you need to be in the folder that contains your code...
5th Feb 2020, 2:14 PM
$hardul B
$hardul B - avatar