platform: remove -Xbootclasspath arguments from IDE command line

It isn't required to have boot.jar on bootclasspath, it's enough to have its classes on the regular classpath (IDEA-185591). Now classes from 'intellij.platform.boot' module are packed into bootstrap.jar.
This commit is contained in:
nik
2018-01-26 10:54:03 +03:00
parent 2ef0a096ba
commit f61dfc5ea6
10 changed files with 16 additions and 9 deletions
Binary file not shown.
Binary file not shown.
@@ -108,7 +108,7 @@ class DistributionJARsBuilder {
withModule("intellij.platform.bootstrap")
withModule("intellij.java.guiForms.rt")
withModule("intellij.platform.icons")
withModule("intellij.platform.boot")
withModule("intellij.platform.boot", "bootstrap.jar")
withModule("intellij.platform.resources", "resources.jar")
withModule("intellij.platform.colorSchemes", "resources.jar")
withModule("intellij.platform.resources.en", productLayout.mainJarName)
@@ -160,7 +160,7 @@ class MacDistributionBuilder extends OsSpecificDistributionBuilder {
}
new File("$target/bin/idea.properties").text = effectiveProperties.toString()
String ideaVmOptions = "${VmOptionsGenerator.vmOptionsForArch(JvmArchitecture.x64, buildContext.productProperties)} -XX:+UseCompressedOops -Dfile.encoding=UTF-8 ${VmOptionsGenerator.computeCommonVmOptions(buildContext.applicationInfo.isEAP)} -Xverify:none ${buildContext.productProperties.additionalIdeJvmArguments} -XX:ErrorFile=\$USER_HOME/java_error_in_${executable}_%p.log -XX:HeapDumpPath=\$USER_HOME/java_error_in_${executable}.hprof -Xbootclasspath/a:../lib/boot.jar".trim()
String ideaVmOptions = "${VmOptionsGenerator.vmOptionsForArch(JvmArchitecture.x64, buildContext.productProperties)} -XX:+UseCompressedOops -Dfile.encoding=UTF-8 ${VmOptionsGenerator.computeCommonVmOptions(buildContext.applicationInfo.isEAP)} -Xverify:none ${buildContext.productProperties.additionalIdeJvmArguments} -XX:ErrorFile=\$USER_HOME/java_error_in_${executable}_%p.log -XX:HeapDumpPath=\$USER_HOME/java_error_in_${executable}.hprof".trim()
if (buildContext.applicationInfo.isEAP && buildContext.productProperties.enableYourkitAgentInEAP && macCustomizer.enableYourkitAgentInEAP) {
ideaVmOptions += " " + VmOptionsGenerator.yourkitOptions(buildContext.systemSelector, "")
}
@@ -195,7 +195,6 @@ fi
# ---------------------------------------------------------------------
IFS="$(printf '\n\t')"
"$JAVA_BIN" \
"-Xbootclasspath/a:$IDE_HOME/lib/boot.jar" \
-classpath "$CLASSPATH" \
${VM_OPTIONS} \
"-XX:ErrorFile=$HOME/java_error_in_@@product_uc@@_%p.log" \
Binary file not shown.
@@ -89,7 +89,7 @@ SET ACC=
FOR /F "eol=# usebackq delims=" %%i IN ("%VM_OPTIONS_FILE%") DO CALL "%IDE_BIN_DIR%\append.bat" "%%i"
IF EXIST "%VM_OPTIONS_FILE%" SET ACC=%ACC% -Djb.vmOptionsFile="%VM_OPTIONS_FILE%"
SET COMMON_JVM_ARGS="-XX:ErrorFile=%USERPROFILE%\java_error_in_@@product_uc@@_%%p.log" "-XX:HeapDumpPath=%USERPROFILE%\java_error_in_@@product_uc@@.hprof" "-Xbootclasspath/a:%IDE_HOME%/lib/boot.jar" -Didea.paths.selector=@@system_selector@@ %IDE_PROPERTIES_PROPERTY%
SET COMMON_JVM_ARGS="-XX:ErrorFile=%USERPROFILE%\java_error_in_@@product_uc@@_%%p.log" "-XX:HeapDumpPath=%USERPROFILE%\java_error_in_@@product_uc@@.hprof" -Didea.paths.selector=@@system_selector@@ %IDE_PROPERTIES_PROPERTY%
SET IDE_JVM_ARGS=@@ide_jvm_args@@
SET ALL_JVM_ARGS=%ACC% %COMMON_JVM_ARGS% %IDE_JVM_ARGS%
@@ -655,13 +655,13 @@ public class ApplicationInfoImpl extends ApplicationInfoEx {
if (dateString.equals("__BUILD_DATE__")) {
myBuildDate = new GregorianCalendar();
try {
final JarFile bootJar = new JarFile(PathManager.getHomePath() + File.separator + "lib" + File.separator + "boot.jar");
final JarFile bootstrapJar = new JarFile(PathManager.getHomePath() + File.separator + "lib" + File.separator + "bootstrap.jar");
try {
final JarEntry jarEntry = bootJar.entries().nextElement(); // /META-INF is always updated on build
final JarEntry jarEntry = bootstrapJar.entries().nextElement(); // /META-INF is always updated on build
myBuildDate.setTime(new Date(jarEntry.getTime()));
}
finally {
bootJar.close();
bootstrapJar.close();
}
}
catch (Exception ignore) { }
@@ -68,7 +68,11 @@ public class JUnitDevKitPatcher extends JUnitPatcher {
if (jdk == null) return;
String libPath = jdk.getHomePath() + File.separator + "lib";
vm.add("-Xbootclasspath/a:" + libPath + File.separator + "boot.jar");
String bootJarPath = libPath + File.separator + "boot.jar";
if (new File(bootJarPath).exists()) {
//there is no need to add boot.jar in modern IDE builds (181.*)
vm.add("-Xbootclasspath/a:" + bootJarPath);
}
if (!vm.hasProperty("idea.load.plugins.id") && module != null && PluginModuleType.isOfType(module)) {
String id = DescriptorUtil.getPluginId(module);
@@ -157,7 +157,11 @@ public class PluginRunConfiguration extends RunConfigurationBase implements Modu
if (!fromIdeaProject) {
String bootPath = "/lib/boot.jar";
vm.add("-Xbootclasspath/a:" + ideaJdkHome + toSystemDependentName(bootPath));
String bootJarPath = ideaJdkHome + toSystemDependentName(bootPath);
if (new File(bootJarPath).exists()) {
//there is no need to add boot.jar in modern IDE builds (181.*)
vm.add("-Xbootclasspath/a:" + bootJarPath);
}
}
vm.defineProperty("idea.config.path", canonicalSandbox + File.separator + "config");