Skip to content

Commit a1af39d

Browse files
committed
Fix Java.add_to_classpath spec for JVM standalone
1 parent e32c79a commit a1af39d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spec/truffle/interop/add_to_classpath_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
describe "Java.add_to_classpath" do
1313
before :all do
1414
jar_dir = File.expand_path(File.dirname(__FILE__)) + '/fixtures/examplejar'
15-
bin_dir = TruffleRuby.graalvm_home + '/bin'
15+
jvm_home = TruffleRuby.graalvm_home || "#{Truffle::Boot.ruby_home}/jvm"
16+
raise "#{jvm_home} does not exist" unless Dir.exist?(jvm_home)
17+
bin_dir = "#{jvm_home}/bin"
1618
Dir.chdir(jar_dir) do
1719
system("#{bin_dir}/javac org/truffleruby/examplejar/Example.java")
1820
system("#{bin_dir}/jar cf example.jar org/truffleruby/examplejar/Example.class")

0 commit comments

Comments
 (0)