Jruby: Illegal reflective access by org.jruby.util.ShellLauncher

Created on 20 Jun 2018  路  3Comments  路  Source: jruby/jruby

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

Most helpful comment

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

All 3 comments

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

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.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

palkan picture palkan  路  3Comments

skunkworker picture skunkworker  路  4Comments

yahonda picture yahonda  路  5Comments

iconara picture iconara  路  5Comments

guizmaii picture guizmaii  路  5Comments