List of usage examples for org.eclipse.jdt.internal.compiler.util Util collectRunningVMBootclasspath
public static void collectRunningVMBootclasspath(List<Classpath> bootclasspaths)
From source file:org.eclipse.tycho.compiler.jdt.CompilerMain.java
License:Open Source License
@Override protected ArrayList handleBootclasspath(ArrayList bootclasspaths, String customEncoding) { final int bootclasspathsSize; if ((bootclasspaths != null) && ((bootclasspathsSize = bootclasspaths.size()) != 0)) { // TODO I don't think this branch will ever get executed String[] paths = new String[bootclasspathsSize]; bootclasspaths.toArray(paths);//from www.jav a 2 s . c om bootclasspaths.clear(); for (int i = 0; i < bootclasspathsSize; i++) { processPathEntries(DEFAULT_SIZE_CLASSPATH, bootclasspaths, paths[i], customEncoding, false, true); } } else { bootclasspaths = new ArrayList(DEFAULT_SIZE_CLASSPATH); if (javaHome != null) { File directoryToCheck; if (isMacOS()) {//$NON-NLS-1$//$NON-NLS-2$ directoryToCheck = new File(javaHome, "../Classes"); } else { directoryToCheck = new File(javaHome, "lib"); } scanForArchives(bootclasspaths, directoryToCheck); if (bootclasspaths.isEmpty()) { mavenLogger .warn("No classpath entries for boot classpath found scanning java home " + javaHome); } } else { try { Util.collectRunningVMBootclasspath(bootclasspaths); } catch (IllegalStateException e) { this.logger.logWrongJDK(); this.proceed = false; return null; } } if (bootclasspathAccessRules != null) { String[] paths = new String[bootclasspaths.size()]; for (int i = 0; i < bootclasspaths.size(); i++) { paths[i] = ((FileSystem.Classpath) bootclasspaths.get(i)).getPath() + bootclasspathAccessRules; } bootclasspaths.clear(); for (int i = 0; i < paths.length; i++) { processPathEntries(DEFAULT_SIZE_CLASSPATH, bootclasspaths, paths[i], customEncoding, false, true); } } // TODO do we need to processPathEntries here? } mavenLogger.debug("Using boot classpath: " + bootclasspaths); return bootclasspaths; }