On 30/09/2015 15:58, Erik Joelsson wrote:
Please review this small fix for the bootcycle-build, which broke when
I removed the interim-corba build.
In JDK 9 then we have moved module java.corba to the extension class
loader. So if code on the boot class path has a reference to types in
the java.corba module then it will fail with NoClassDefFoundError.
This currently happens since we add the interim rmic classes to the
bootclasspath, but no longer the interim-corba classes.
The fix is to not set -Xbootclasspath/p at all. It was never needed
and I just did it that way originally by trying to match existing
patterns. I have verified that the bug which prompted the introduction
of interim-rmic is still fixed when running without -Xbootclasspath/p.
Bug: https://bugs.openjdk.java.net/browse/JDK-8138636
Patch inline:
diff -r 14faed4d6a50 make/rmic/RmicCommon.gmk
--- a/make/rmic/RmicCommon.gmk
+++ b/make/rmic/RmicCommon.gmk
@@ -33,7 +33,7 @@
BTRMIC_CP := $(call PathList, \
$(BUILDTOOLS_OUTPUTDIR)/interim_rmic_classes
$(INTERIM_LANGTOOLS_JAR))
-BTRMIC_ARGS := -Xbootclasspath/p:$(BTRMIC_CP) -cp $(BTRMIC_CP)
+BTRMIC_ARGS := -cp $(BTRMIC_CP)
RMIC := $(JAVA) $(BTRMIC_ARGS) sun.rmi.rmic.Main
CLASSES_DIR := $(JDK_OUTPUTDIR)/modules
This looks okay for now but still somewhat fragile because rmic -iiop
has a dependency on com.sun.corba classes.
Also when doing a boot cycle build then you'll find that the
sun.rmi.rmic.* classes are being loaded from the newly built = boot JDK
and now the "new new" interim rmic. This shouldn't matter of course.
-Alan