I have written a java program that also needs to verify that my VMware workstation exists and should start up my VMware workstation if not already running. How should I do this? Currently I do the code below but I also need to start up a specific VMware workstation also.
public void runVM() throws IOException{
File vmPath = new File("../VMware/VMware Workstation/vmware.exe");
File iePath = new File("../Documents/Virtual Machines/InkEstimator_K2");
if (vmPath.exists() && iePath.exists()){
//check if running
Desktop dt = Desktop.getDesktop();
if(vmPath.canExecute()){
dt.open(vmPath);
}
}
}
0 Replies