Skip to content

Commit dc93e47

Browse files
committed
[GR-18163] JT: Add env var $JT_JDK to select the JDK globally
PullRequest: truffleruby/2453
2 parents 6faa4d0 + 8fb3c73 commit dc93e47

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tool/jt.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ def help
741741
OPENSSL_PREFIX Where to find OpenSSL headers and libraries
742742
ECLIPSE_EXE Where to find Eclipse
743743
SYSTEM_RUBY The Ruby interpreter to run 'jt' itself, when using 'bin/jt'
744+
JT_JDK The JDK version to use: 8 or 11 (default)
745+
JT_PROFILE_SUBCOMMANDS Print the time each subprocess takes on stderr
744746
TXT
745747
end
746748

@@ -1953,7 +1955,7 @@ def igv
19531955
def install(name, *options)
19541956
case name
19551957
when 'jvmci'
1956-
puts install_jvmci('Downloading JDK8 with JVMCI', (@ruby_name || '').include?('ee'))
1958+
puts install_jvmci("Downloading JDK#{@jdk_version} with JVMCI", (@ruby_name || '').include?('ee'))
19571959
when 'eclipse'
19581960
puts install_eclipse
19591961
else
@@ -2706,7 +2708,7 @@ def process_pre_args(args)
27062708
needs_build = false
27072709
needs_rebuild = false
27082710
@silent = false
2709-
@jdk_version = 11
2711+
@jdk_version = Integer(ENV['JT_JDK'] || 11)
27102712

27112713
until args.empty?
27122714
arg = args.shift

0 commit comments

Comments
 (0)