@Override protected IVMInstall doCreateVMInstall(String id) { return new StandardVM(this, id); }
@Override public String getJavaVersion() { StandardVMType installType = (StandardVMType) getVMInstallType(); File installLocation = getInstallLocation(); if (installLocation != null) { File executable = getJavaExecutable(); if (executable != null) { String vmVersion = installType.getVMVersion(installLocation, executable); // strip off extra info StringBuffer version = new StringBuffer(); for (int i = 0; i < vmVersion.length(); i++) { char ch = vmVersion.charAt(i); if (Character.isDigit(ch) || ch == '.') { version.append(ch); } else { break; } } if (version.length() > 0) { return version.toString(); } } } return null; }
/** * Returns the java executable for this VM or <code>null</code> if cannot be found * * @return executable for this VM or <code>null</code> if none */ File getJavaExecutable() { File installLocation = getInstallLocation(); if (installLocation != null) { return StandardVMType.findJavaExecutable(installLocation); } return null; }
File exe = null; if (fVMInstance instanceof StandardVM) { exe = ((StandardVM)fVMInstance).getJavaExecutable(); } else { exe = StandardVMType.findJavaExecutable(fVMInstance.getInstallLocation());
if (fVMInstance instanceof StandardVM && ((StandardVM)fVMInstance).getDebugArgs() != null){ String debugArgString = ((StandardVM)fVMInstance).getDebugArgs().replaceAll("\\Q" + StandardVM.VAR_PORT + "\\E", Integer.toString(port)); //$NON-NLS-1$ //$NON-NLS-2$ String[] debugArgs = DebugPlugin.parseArguments(debugArgString); for (int i = 0; i < debugArgs.length; i++) {
/** * Returns the java executable for this VM or <code>null</code> if cannot be found * * @return executable for this VM or <code>null</code> if none */ File getJavaExecutable() { File installLocation = getInstallLocation(); if (installLocation != null) { return StandardVMType.findJavaExecutable(installLocation); } return null; }
File exe = null; if (fVMInstance instanceof StandardVM) { exe = ((StandardVM)fVMInstance).getJavaExecutable(); } else { exe = StandardVMType.findJavaExecutable(fVMInstance.getInstallLocation());
if (fVMInstance instanceof StandardVM && ((StandardVM)fVMInstance).getDebugArgs() != null){ String debugArgString = ((StandardVM)fVMInstance).getDebugArgs().replaceAll("\\Q" + StandardVM.VAR_PORT + "\\E", Integer.toString(port)); //$NON-NLS-1$ //$NON-NLS-2$ String[] debugArgs = DebugPlugin.parseArguments(debugArgString); for (int i = 0; i < debugArgs.length; i++) {
@Override public String getJavaVersion() { StandardVMType installType = (StandardVMType) getVMInstallType(); File installLocation = getInstallLocation(); if (installLocation != null) { File executable = getJavaExecutable(); if (executable != null) { String vmVersion = installType.getVMVersion(installLocation, executable); // strip off extra info StringBuilder version = new StringBuilder(); for (int i = 0; i < vmVersion.length(); i++) { char ch = vmVersion.charAt(i); if (Character.isDigit(ch) || ch == '.') { version.append(ch); } else { break; } } if (version.length() > 0) { return version.toString(); } } LaunchingPlugin.log(NLS.bind(LaunchingMessages.vmInstall_could_not_determine_java_Version, installLocation.getAbsolutePath())); } return null; }
@Override protected IVMInstall doCreateVMInstall(String id) { return new StandardVM(this, id); }