Skip to content

Commit 25cbe85

Browse files
committedJul 7, 2023
8310550: Adjust references to rt.jar
Reviewed-by: erikj, clanger
1 parent 848abd2 commit 25cbe85

File tree

12 files changed

+9
-17
lines changed

12 files changed

+9
-17
lines changed
 

‎make/modules/java.desktop/Java.gmk

+1-2
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@ endif
141141
# pick them up since they aren't generated when the source dirs are
142142
# searched and they aren't referenced by any other classes so they won't
143143
# be picked up by implicit compilation. On a rebuild, they are picked up
144-
# and compiled. Exclude them here to produce the same rt.jar as the old
145-
# build does when building just once.
144+
# and compiled.
146145
EXCLUDE_FILES += \
147146
javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \
148147
javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \

‎src/demo/share/nbproject/jfc/FileChooserDemo/nbproject/project.xml

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
<properties>
4040
<property-file>user.build.properties</property-file>
4141
<property-file>build.properties</property-file>
42-
<property name="nbjdk.bootclasspath">${nbjdk.home}/jre/lib/rt.jar</property>
4342
</properties>
4443
<folders>
4544
<source-folder>

‎src/demo/share/nbproject/jfc/Notepad/nbproject/jdk.xml

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
<property name="nbjdk.java" value="${nbjdk.home}/bin/java${.exe}"/>
4343
<property name="nbjdk.javadoc" value="${nbjdk.home}/bin/javadoc${.exe}"/>
4444
<property name="nbjdk.appletviewer" value="${nbjdk.home}/bin/appletviewer${.exe}"/>
45-
<property name="nbjdk.bootclasspath" value="${nbjdk.home}/jre/lib/rt.jar"/>
4645
</target>
4746

4847
<target name="-jdk-presetdef-basic" depends="-jdk-preinit" unless="nbjdk.presetdef.basic.done">

‎src/demo/share/nbproject/jfc/SampleTree/nbproject/project.xml

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
<properties>
4040
<property-file>user.build.properties</property-file>
4141
<property-file>build.properties</property-file>
42-
<property name="nbjdk.bootclasspath">${nbjdk.home}/jre/lib/rt.jar</property>
4342
</properties>
4443
<folders>
4544
<source-folder>

‎src/demo/share/nbproject/jfc/TableExample/nbproject/project.xml

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
<properties>
4040
<property-file>user.build.properties</property-file>
4141
<property-file>build.properties</property-file>
42-
<property name="nbjdk.bootclasspath">${nbjdk.home}/jre/lib/rt.jar</property>
4342
</properties>
4443
<folders>
4544
<source-folder>

‎src/java.sql/share/classes/java/sql/DriverManager.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -652,10 +652,9 @@ public Void run() {
652652
private static Connection getConnection(
653653
String url, java.util.Properties info, Class<?> caller) throws SQLException {
654654
/*
655-
* When callerCl is null, we should check the application's
656-
* (which is invoking this class indirectly)
657-
* classloader, so that the JDBC driver class outside rt.jar
658-
* can be loaded from here.
655+
* If the caller is defined to the bootstrap or platform class loader then use
656+
* the Thread CCL as the initiating class loader so that a JDBC on the class path,
657+
* or bundled with an application, is found.
659658
*/
660659
ClassLoader callerCL = caller != null ? caller.getClassLoader() : null;
661660
if (callerCL == null || callerCL == ClassLoader.getPlatformClassLoader()) {

‎src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ private Path getPath(String first, String... more) {
193193
}
194194

195195
/**
196-
* Set whether or not to use ct.sym as an alternate to rt.jar.
196+
* Set whether or not to use ct.sym as an alternate to the current runtime.
197197
*/
198198
public void setSymbolFileEnabled(boolean b) {
199199
symbolFileEnabled = b;

‎test/hotspot/jtreg/compiler/c2/Test6603011.java

-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ public static void main(String[] args) throws Exception {
212212
}
213213

214214
// Try a few divisors outside the typical range.
215-
// The values below have been observed in rt.jar.
216215
test_divisor(101, apploader);
217216
test_divisor(400, apploader);
218217
test_divisor(1000, apploader);

‎test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach024/TestDescription.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* Test checks that agent's JAR file is appended at the end of the system class path.
3838
* Agent's JAR file contains modified class java.util.TooManyListenersException (it is assumed
3939
* that this class isn't loaded before agent is loaded), agent instantiates TooManyListenersException
40-
* and checks that non-modified version of this class was loaded from rt.jar (not from agent's JAR).
40+
* and checks that non-modified version of this class was loaded from the jdk image (not from agent's JAR).
4141
*
4242
* @library /vmTestbase
4343
* /test/lib

‎test/jdk/com/sun/tools/attach/ProviderTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ private static void buildJar() throws Throwable {
107107
public static class TestMain {
108108
public static void main(String args[]) throws Exception {
109109
// deal with internal builds where classes are loaded from the
110-
// 'classes' directory rather than rt.jar
110+
// 'classes' directory rather than the runtime image
111111
ClassLoader cl = AttachProvider.class.getClassLoader();
112112
if (cl != ClassLoader.getSystemClassLoader()) {
113113
System.out.println("Attach API not loaded by system class loader - test skipped");

‎test/jdk/java/lang/Class/getDeclaredField/FieldSetAccessibleTest.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,7 @@ static void test(Iterable<String> iterable) {
228228
throw new RuntimeException("Test failed for the following classes: " + failed);
229229
}
230230
if (!classFound && startIndex == 0 && index < maxIndex) {
231-
// this is just to verify that we have indeed parsed rt.jar
232-
// (or the java.base module)
231+
// this is just to verify that we have indeed parsed the java.base module
233232
throw new RuntimeException("Test failed: Class.class not found...");
234233
}
235234
if (classCount.get() == 0 && startIndex == 0) {

‎test/langtools/tools/javap/4798312/JavapShouldLoadClassesFromRTJarTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/*
2525
* @test
2626
* @bug 4798312
27-
* @summary In Windows, javap doesn't load classes from rt.jar
27+
* @summary In Windows, javap doesn't load classes from the runtime image
2828
* @library /tools/lib
2929
* @modules jdk.compiler/com.sun.tools.javac.api
3030
* jdk.compiler/com.sun.tools.javac.main

0 commit comments

Comments
 (0)
Please sign in to comment.