1 11 package org.eclipse.jdt.internal.launching; 12 13 14 import java.io.File ; 15 16 import org.eclipse.core.runtime.IPath; 17 import org.eclipse.core.runtime.Path; 18 import org.eclipse.jdt.launching.IVMInstall; 19 import org.eclipse.jdt.launching.LibraryLocation; 20 21 25 public class Standard11xVMType extends StandardVMType { 26 27 30 protected IPath getDefaultSystemLibrary(File installLocation) { 31 return new Path(installLocation.getPath()).append("lib").append("classes.zip"); } 33 34 37 protected IVMInstall doCreateVMInstall(String id) { 38 return new Standard11xVM(this, id); 39 } 40 41 44 protected IPath getDefaultSystemLibrarySource(File libLocation) { 45 setDefaultRootPath(""); return Path.EMPTY; 47 } 48 49 52 public String getName() { 53 return LaunchingMessages.Standard11xVMType_Standard_1_1_x_VM_1; 54 } 55 56 61 protected File getDefaultExtensionDirectory(File installLocation) { 62 return null; 63 } 64 65 68 protected File getDefaultEndorsedDirectory(File installLocation) { 69 return null; 70 } 71 72 75 public LibraryLocation[] getDefaultLibraryLocations(File installLocation) { 76 IPath libPath = getDefaultSystemLibrary(installLocation); 77 File lib = libPath.toFile(); 78 if (lib.exists()) { 79 return new LibraryLocation[] {new LibraryLocation(libPath, getDefaultSystemLibrarySource(lib), getDefaultPackageRootPath())}; 80 } 81 return new LibraryLocation[0]; 82 } 83 84 88 protected boolean canDetectDefaultSystemLibraries(File javaHome, File javaExecutable) { 89 LibraryLocation[] locations = getDefaultLibraryLocations(javaHome); 90 String version = getVMVersion(javaHome, javaExecutable); 91 return locations.length > 0 && version.startsWith("1.1"); } 93 } 94 | Popular Tags |