8150973: Hotspot agent use of sun.boot.class.path needs to be updated for Jigsaw
Summary: remove the code
Reviewed-by: alanb, sspitsyn
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/CommandProcessor.java Wed Mar 30 14:44:27 2016 -0500
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/CommandProcessor.java Thu Mar 31 14:17:16 2016 +0300
@@ -549,11 +549,9 @@
},
new Command("buildreplayjars", "buildreplayjars [ all | app | boot ] | [ prefix ]", false) {
// This is used to dump jar files of all the classes
- // loaded in the core. Everything on the bootclasspath
+ // loaded in the core. Everything with null classloader
// will go in boot.jar and everything else will go in
- // app.jar. Then the classes can be loaded by the replay
- // jvm using -Xbootclasspath/p:boot.jar -cp app.jar. boot.jar usually
- // not needed, unless changed by jvmti.
+ // app.jar. boot.jar usually not needed, unless changed by jvmti.
public void doit(Tokens t) {
int tcount = t.countTokens();
if (tcount > 2) {
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/VirtualMachineImpl.java Wed Mar 30 14:44:27 2016 -0500
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/VirtualMachineImpl.java Thu Mar 31 14:17:16 2016 +0300
@@ -780,8 +780,8 @@
return getPath("java.class.path");
}
- public List bootClassPath() {
- return getPath("sun.boot.class.path");
+ public List<String> bootClassPath() {
+ return Collections.emptyList();
}
public String baseDirectory() {
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaVM.java Wed Mar 30 14:44:27 2016 -0500
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaVM.java Thu Mar 31 14:17:16 2016 +0300
@@ -75,8 +75,6 @@
return vm.getVMRelease();
case FIELD_CLASS_PATH:
return getClassPath();
- case FIELD_BOOT_CLASS_PATH:
- return getBootClassPath();
case FIELD_USER_DIR:
return getUserDir();
case FIELD_UNDEFINED:
@@ -143,7 +141,6 @@
addField("type", FIELD_TYPE);
addField("version", FIELD_VERSION);
addField("classPath", FIELD_CLASS_PATH);
- addField("bootClassPath", FIELD_BOOT_CLASS_PATH);
addField("userDir", FIELD_USER_DIR);
}
@@ -217,10 +214,6 @@
return vm.getSystemProperty("java.class.path");
}
- private String getBootClassPath() {
- return vm.getSystemProperty("sun.boot.class.path");
- }
-
private String getUserDir() {
return vm.getSystemProperty("user.dir");
}