Skip to content

Commit a9e9997

Browse files
committed
Remove find-java-rt-jar.sh, document how -b interacts with older JDKs
* Remove the use of the `find-java-rt-jar.sh` script in CI, as this is no longer necessary with the advent of `--java-bin-dirs`/searching the `PATH` for Java. This fixes #1061. * On a related note, it turns out that SAW's approach to detecting where `rt.jar` lives likely doesn't work on pre-7 JDKs on macOS. Given how ancient these versions of Java anymore, let's just document this infelicity in the manual and describe a workaround for those brave enough to try this. Fixes #1062.
1 parent f8449a1 commit a9e9997

File tree

3 files changed

+14
-25
lines changed

3 files changed

+14
-25
lines changed

doc/manual/manual.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -1557,8 +1557,14 @@ control where to look for classes:
15571557
files found in that directory (and its subdirectories) to the class database.
15581558
By default, the current directory is included in the class path.
15591559

1560-
Most Java programs will only require setting the `-b` flag, as that is enough
1561-
to bring in the standard Java libraries.
1560+
Most Java programs will only require setting the `-b` flag (or the `PATH`), as
1561+
that is enough to bring in the standard Java libraries. Note that when
1562+
searching the `PATH`, SAW makes assumptions about where the standard library
1563+
classes live. These assumptions are likely to hold on JDK 7 or later, but they
1564+
may not hold on older JDKs on certain operating systems. If you are using an
1565+
old version of the JDK and SAW is unable to find a standard Java class, you may
1566+
need to specify the location of the standard classes' JAR file with the `-j`
1567+
flag (or, alternatively, with the `SAW_JDK_JAR` environment variable).
15621568

15631569
Once the class path is configured, you can pass the name of a class to
15641570
the `java_load_class` function.

intTests/runtests.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@ fi
3636

3737
# Build the class path. On Windows, Java requires Windows-style paths
3838
# here, even in Cygwin.
39-
#
40-
# Locate rt.jar. This is already a Windows path on windows, so no need
41-
# to 'cygpath' it.
42-
JDK=$(support/find-java-rt-jar.sh)
43-
CP="$JDK"
39+
CP=""
4440
# Add our bundled .jars to the class path.
4541
for i in "$TESTBASE"/jars/*.jar; do
4642
if [ "$OS" == "Windows_NT" ]; then
4743
i=$(cygpath -w "$i")
4844
fi
49-
CP=$CP$CPSEP$i
45+
if [ -z "$CP" ]; then
46+
CP=$i
47+
else
48+
CP=$CP$CPSEP$i
49+
fi
5050
done
5151
export CP
5252

intTests/support/find-java-rt-jar.sh

-17
This file was deleted.

0 commit comments

Comments
 (0)