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 operation using sbt 1.9.9 with Java 11 (but not 8 or 17 or 21) #7505

Open
mkurz opened this issue Feb 26, 2024 · 2 comments

Comments

@mkurz
Copy link
Member

mkurz commented Feb 26, 2024

  • Does not occur with Java 17 and 21 (using sbt 1.9.9 as well), only shows on Java 11
  • Does not occur with sbt 1.9.8
$ java -version
openjdk version "11.0.22" 2024-01-16
OpenJDK Runtime Environment Temurin-11.0.22+7 (build 11.0.22+7)
OpenJDK 64-Bit Server VM Temurin-11.0.22+7 (build 11.0.22+7, mixed mode)

$ cat project/build.properties 
sbt.version=1.9.9

$ sbt
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jline.terminal.impl.exec.ExecTerminalProvider$ReflectionRedirectPipeCreator (file:/home/mkurz/.sbt/boot/scala-2.12.18/org.scala-sbt/sbt/1.9.9/jline-terminal-3.24.1.jar) to constructor java.lang.ProcessBuilder$RedirectPipeImpl()
WARNING: Please consider reporting this to the maintainers of org.jline.terminal.impl.exec.ExecTerminalProvider$ReflectionRedirectPipeCreator
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
[info] welcome to sbt 1.9.9 (Eclipse Adoptium Java 11.0.22)
...
@mkurz mkurz added the Bug label Feb 26, 2024
@mkurz mkurz changed the title `illegal reflective access operation´ using sbt 1.9.9 with Java 11 illegal reflective access operation using sbt 1.9.9 with Java 11 Feb 26, 2024
@SethTisue
Copy link
Member

This is the same as scala/bug#12957 and further upgrading JLine to 3.25.1 (1.9.9 went to 3.24.1) should fix it.

The warning is harmless/ignorable.

@SethTisue SethTisue changed the title illegal reflective access operation using sbt 1.9.9 with Java 11 illegal reflective access operation using sbt 1.9.9 with Java 11 (but not 8 or 17 or 21) Feb 26, 2024
@irisTa56
Copy link

I could suppress the warnings by setting a system property mentioned in jline/jline3#951. (I'm using macOS 14.4.1)

$ sbt -Dorg.jline.terminal.exec.redirectPipeCreationMode=native
[info] welcome to sbt 1.9.9 (Amazon.com Inc. Java 11.0.22)
...

Still, I would appreciate it if the warning could be resolved without setting the system property.

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

No branches or pull requests

4 participants