Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illegal reflective access by org.jruby.util.ShellLauncher #5223

Closed
elsabio opened this issue Jun 20, 2018 · 3 comments
Closed

Illegal reflective access by org.jruby.util.ShellLauncher #5223

elsabio opened this issue Jun 20, 2018 · 3 comments

Comments

@elsabio
Copy link

elsabio commented Jun 20, 2018

Environment

I'm seeing this with jruby 9.1.17.0 (jrubycomplete.jar's ScriptingContainer) with Java 10.0.1 on a Windows 10 platform.

Expected Behavior

No Warning!

Actual Behavior

This is the warning I see:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jruby.util.ShellLauncher (jar:file:/C:/Work/.../script_jruby.jar!/lib/jrubycomplete.jar) to field java.lang.ProcessImpl.handle
WARNING: Please consider reporting this to the maintainers of org.jruby.util.ShellLauncher
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

@hupfis
Copy link

hupfis commented Sep 28, 2018

Similar problem with jruby 9.2.0.0 with Java 10.0.2 on a Windows 10 platform
Jruby version info:

jruby 9.2.0.0 (2.5.0) 2018-05-24 81156a8 Java HotSpot(TM) 64-Bit Server VM 10.0.2+13 on 10.0.2+13 +jit [mswin32-x86_64]

Warnings:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jruby.runtime.encoding.EncodingService to field java.io.Console.cs
WARNING: Please consider reporting this to the maintainers of org.jruby.runtime.encoding.EncodingService
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

@headius
Copy link
Member

headius commented Oct 9, 2018

This is a known issue and there's other bugs to track it. The warnings are just that: warnings. They should not directly affect execution.

They do, however, indicate that we're likely backing off more invasive use of the JDK core classes, which can in turn lead to a degradation of compatibility with CRuby. This is being improved over time, but ultimately will require that we modularize JRuby and request that the JDK open up the classes we need to access.

@headius headius added this to the Invalid or Duplicate milestone Oct 9, 2018
@headius headius closed this as completed Oct 9, 2018
@elsabio
Copy link
Author

elsabio commented Dec 14, 2018

Thanks for the statement of direction. Just in case anyone else finds this ticket in a search, for Open JDK at least, JEP 261 does specify that modules can be opened up either on the command line or in a jar manifest. This is obviously at the user's own risk, but we have had some success with Add-Opens in the manifest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants