throws Exception
{
ArrayList<HashMap<String,Object>> results =
new ArrayList<HashMap<String,Object>>();
AbstractVMInstall defaultInstall =
(AbstractVMInstall)JavaRuntime.getDefaultVMInstall();
IVMInstallType[] types = JavaRuntime.getVMInstallTypes();
for (IVMInstallType type : types){
IVMInstall[] installs = type.getVMInstalls();
if (installs.length > 0){
for (IVMInstall iinstall : installs){
AbstractVMInstall install = (AbstractVMInstall)iinstall;
HashMap<String,Object> result = new HashMap<String,Object>();
results.add(result);
result.put("type", type.getName());
result.put("name", install.getName());
result.put("dir", install.getInstallLocation().getPath());
result.put("version", install.getJavaVersion());
result.put("args", install.getVMArgs());
result.put("default", install.equals(defaultInstall));
}
}
}
return results;
}