Skip to content

Commit

Permalink
Merge pull request sbt#211 from eatkins/gc-output
Browse files Browse the repository at this point in the history
Whitelist java9-rt-ext- output in rt export process
  • Loading branch information
dwijnand authored Feb 13, 2018
2 parents 09cf5cb + 09a7152 commit aa574a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ public static void main(String[] args) {
if (destination.equals("--rt-ext-dir")) {
String v = System.getProperty("java.vendor") + "_" + System.getProperty("java.version");
v = v.replaceAll("\\W", "_").toLowerCase();
/*
* The launch script greps for output starting with "java9-rt-ext-" so changing this
* string will require changing the grep command in sbt-launch-lib.bash.
*/
Path rtExtDir = Paths.get(globalBase, "java9-rt-ext-" + v);
System.out.println(rtExtDir.toString());
System.exit(0);
Expand Down
3 changes: 2 additions & 1 deletion src/universal/bin/sbt-launch-lib.bash
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,9 @@ copyRt() {
local at_least_9="$(expr $java_version ">=" 9)"
if [[ "$at_least_9" == "1" ]]; then
rtexport=$(rt_export_file)
# The grep for java9-rt-ext- matches the filename prefix printed in Export.java
java9_ext=$("$java_cmd" ${JAVA_OPTS} ${SBT_OPTS:-$default_sbt_opts} ${java_args[@]} \
-jar "$rtexport" --rt-ext-dir | grep -v Listening)
-jar "$rtexport" --rt-ext-dir | grep java9-rt-ext-)
java9_rt=$(echo "$java9_ext/rt.jar")
vlog "[copyRt] java9_rt = '$java9_rt'"
if [[ ! -f "$java9_rt" ]]; then
Expand Down

0 comments on commit aa574a8

Please sign in to comment.