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

build: An illegal reflective access operation has occurred #2039

Open
bflorat opened this issue Nov 6, 2019 · 6 comments
Open

build: An illegal reflective access operation has occurred #2039

bflorat opened this issue Nov 6, 2019 · 6 comments
Milestone

Comments

@bflorat
Copy link
Contributor

bflorat commented Nov 6, 2019

To be fixed :

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jajuk.services.players.AbstractMPlayerImpl (file:/home/bflorat/workspaces/workspace-jajuk/jajuk/build/linux/jajuk-11/jajuk.jar) to field java.lang.ProcessImpl.pid
WARNING: Please consider reporting this to the maintainers of org.jajuk.services.players.AbstractMPlayerImpl
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
@bflorat bflorat added this to the 12 milestone Nov 6, 2019
@DavidPerezIngeniero
Copy link

This warning is harmless.
The app continues to work.

@gkerdal
Copy link
Contributor

gkerdal commented Apr 15, 2020

The warning comes from the way jajuk gets the process id :
Field field = proc.getClass().getDeclaredField("pid");

There's is a safe java 9 solution :
https://docs.oracle.com/javase/9/docs/api/java/lang/Process.html#pid--

I suggest to ignore this warning unless we move to java 9.

@bflorat
Copy link
Contributor Author

bflorat commented Apr 15, 2020

What have we got to do to switch to Java 9 ?

@gkerdal
Copy link
Contributor

gkerdal commented Apr 16, 2020

I mean in java 9, the Process class has a pid() method so we can change the code to avoid the warning. That implies that Jajuk users switch to a java 9 or above version to use next version of Jajuk.
if it's just to avoid a warning, I wonder if it's worth switching to java 9 or even 11 (LTS version).

@bflorat
Copy link
Contributor Author

bflorat commented Apr 16, 2020

Maybe we can wait until end of support of Java 8 (dec 2020) ?

@gkerdal
Copy link
Contributor

gkerdal commented Apr 21, 2020

I agree

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