-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
Hello,
on JRuby version
jruby 9.2.11.1 (2.5.7) 2020-03-25 b1f55b1a40 OpenJDK 64-Bit Server VM 11.0.7+10-LTS on 11.0.7+10-LTS +jit [darwin-x86_64]
the following code
java_import java.net.http.HttpClient
java_import java.time.Duration
builder = HttpClient.new_builder
builder.followRedirects(HttpClient::Redirect::NORMAL)
builder.connectTimeout(Duration.ofSeconds(20))
@client = builder.buildfails with
TypeError: illegal access on 'build': class org.jruby.javasupport.JavaMethod (in module org.jruby.dist) cannot access class jdk.internal.net.http.HttpClientBuilderImpl (in module java.net.http) because module java.net.http does not export jdk.internal.net.http to module org.jruby.dist
When the package is opened, it works fine.
--add-opens java.net.http/jdk.internal.net.http=org.jruby.dist
However, is it really necessary for JRuby to require access to the internal package?
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels