-
Notifications
You must be signed in to change notification settings - Fork 21
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
WARNING: java.lang.System::load has been called by org.jline.nativ.JLineNativeLoader in an unnamed module #13030
Comments
Thanks @xuwei-k! So IIUC we're getting the warning because Scala is not using the module system (ie, using the unnamed module), as well as jline. There would be no warning if the code using JNI was in a different module Is there any other option than adding the |
I don't think so. AFAIU from the JEP, all code, whether in a module or not, is disallowed JNI by default. So regardless, you need a command-line option. The only difference that modules make is that you can grant specific modules access to JNI, without granting all of the code on the classpath. Whereas for code in the unnamed module, you have no choice but to grant JNI access to the entire classpath. |
note sure whether this should also be reported to JLine 3 and perhaps to other repos such as Scala 3, scala-cli, sbt... if we have to add Yoshida-san did already open sbt/sbt#7634 but it's about ipcsocket rather than JLine |
You're right, I got confused by this (from the JEP):
The JEP clearly says:
|
Reproduction steps
install jdk 24
launch Scala 2.13.14 REPL
Problem
https://openjdk.org/jeps/472
The text was updated successfully, but these errors were encountered: