File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 12
12
describe "Java.add_to_classpath" do
13
13
before :all do
14
14
jar_dir = File . expand_path ( File . dirname ( __FILE__ ) ) + '/fixtures/examplejar'
15
- bin_dir = TruffleRuby . graalvm_home + '/bin'
15
+ java_home = Truffle ::System . get_java_property ( 'java.home' )
16
+ raise "#{ java_home } does not exist" unless Dir . exist? ( java_home )
17
+ bin_dir = "#{ java_home } /bin"
16
18
Dir . chdir ( jar_dir ) do
17
19
system ( "#{ bin_dir } /javac org/truffleruby/examplejar/Example.java" )
18
20
system ( "#{ bin_dir } /jar cf example.jar org/truffleruby/examplejar/Example.class" )
Original file line number Diff line number Diff line change @@ -331,7 +331,7 @@ def truffleruby_compiler?
331
331
return @truffleruby_compiler = true if truffleruby_native_built?
332
332
333
333
# Detect if the compiler is present by reading the $graalvm_home/release file
334
- @truffleruby_compiler = File . readlines ( "#{ graalvm_home } /release" ) . grep ( /^COMMIT_INFO=/ ) . any? do |line |
334
+ @truffleruby_compiler = File . readlines ( "#{ graalvm_home || ruby_home } /release" ) . grep ( /^COMMIT_INFO=/ ) . any? do |line |
335
335
line . include? ( '"compiler":' ) || line . include? ( "'compiler':" )
336
336
end
337
337
end
You can’t perform that action at this time.
0 commit comments