Skip to content

Commit

Permalink
8310550: Adjust references to rt.jar
Browse files Browse the repository at this point in the history
Reviewed-by: erikj, clanger
  • Loading branch information
MBaesken committed Jul 7, 2023
1 parent 848abd2 commit 25cbe85
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 17 deletions.
3 changes: 1 addition & 2 deletions make/modules/java.desktop/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ endif
# pick them up since they aren't generated when the source dirs are
# searched and they aren't referenced by any other classes so they won't
# be picked up by implicit compilation. On a rebuild, they are picked up
# and compiled. Exclude them here to produce the same rt.jar as the old
# build does when building just once.
# and compiled.
EXCLUDE_FILES += \
javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \
javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
<properties>
<property-file>user.build.properties</property-file>
<property-file>build.properties</property-file>
<property name="nbjdk.bootclasspath">${nbjdk.home}/jre/lib/rt.jar</property>
</properties>
<folders>
<source-folder>
Expand Down
1 change: 0 additions & 1 deletion src/demo/share/nbproject/jfc/Notepad/nbproject/jdk.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
<property name="nbjdk.java" value="${nbjdk.home}/bin/java${.exe}"/>
<property name="nbjdk.javadoc" value="${nbjdk.home}/bin/javadoc${.exe}"/>
<property name="nbjdk.appletviewer" value="${nbjdk.home}/bin/appletviewer${.exe}"/>
<property name="nbjdk.bootclasspath" value="${nbjdk.home}/jre/lib/rt.jar"/>
</target>

<target name="-jdk-presetdef-basic" depends="-jdk-preinit" unless="nbjdk.presetdef.basic.done">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
<properties>
<property-file>user.build.properties</property-file>
<property-file>build.properties</property-file>
<property name="nbjdk.bootclasspath">${nbjdk.home}/jre/lib/rt.jar</property>
</properties>
<folders>
<source-folder>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
<properties>
<property-file>user.build.properties</property-file>
<property-file>build.properties</property-file>
<property name="nbjdk.bootclasspath">${nbjdk.home}/jre/lib/rt.jar</property>
</properties>
<folders>
<source-folder>
Expand Down
7 changes: 3 additions & 4 deletions src/java.sql/share/classes/java/sql/DriverManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -652,10 +652,9 @@ public Void run() {
private static Connection getConnection(
String url, java.util.Properties info, Class<?> caller) throws SQLException {
/*
* When callerCl is null, we should check the application's
* (which is invoking this class indirectly)
* classloader, so that the JDBC driver class outside rt.jar
* can be loaded from here.
* If the caller is defined to the bootstrap or platform class loader then use
* the Thread CCL as the initiating class loader so that a JDBC on the class path,
* or bundled with an application, is found.
*/
ClassLoader callerCL = caller != null ? caller.getClassLoader() : null;
if (callerCL == null || callerCL == ClassLoader.getPlatformClassLoader()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ private Path getPath(String first, String... more) {
}

/**
* Set whether or not to use ct.sym as an alternate to rt.jar.
* Set whether or not to use ct.sym as an alternate to the current runtime.
*/
public void setSymbolFileEnabled(boolean b) {
symbolFileEnabled = b;
Expand Down
1 change: 0 additions & 1 deletion test/hotspot/jtreg/compiler/c2/Test6603011.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ public static void main(String[] args) throws Exception {
}

// Try a few divisors outside the typical range.
// The values below have been observed in rt.jar.
test_divisor(101, apploader);
test_divisor(400, apploader);
test_divisor(1000, apploader);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* Test checks that agent's JAR file is appended at the end of the system class path.
* Agent's JAR file contains modified class java.util.TooManyListenersException (it is assumed
* that this class isn't loaded before agent is loaded), agent instantiates TooManyListenersException
* and checks that non-modified version of this class was loaded from rt.jar (not from agent's JAR).
* and checks that non-modified version of this class was loaded from the jdk image (not from agent's JAR).
*
* @library /vmTestbase
* /test/lib
Expand Down
2 changes: 1 addition & 1 deletion test/jdk/com/sun/tools/attach/ProviderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private static void buildJar() throws Throwable {
public static class TestMain {
public static void main(String args[]) throws Exception {
// deal with internal builds where classes are loaded from the
// 'classes' directory rather than rt.jar
// 'classes' directory rather than the runtime image
ClassLoader cl = AttachProvider.class.getClassLoader();
if (cl != ClassLoader.getSystemClassLoader()) {
System.out.println("Attach API not loaded by system class loader - test skipped");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ static void test(Iterable<String> iterable) {
throw new RuntimeException("Test failed for the following classes: " + failed);
}
if (!classFound && startIndex == 0 && index < maxIndex) {
// this is just to verify that we have indeed parsed rt.jar
// (or the java.base module)
// this is just to verify that we have indeed parsed the java.base module
throw new RuntimeException("Test failed: Class.class not found...");
}
if (classCount.get() == 0 && startIndex == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/*
* @test
* @bug 4798312
* @summary In Windows, javap doesn't load classes from rt.jar
* @summary In Windows, javap doesn't load classes from the runtime image
* @library /tools/lib
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
Expand Down

1 comment on commit 25cbe85

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.