jajuk-team / jajuk

Advanded jukebox for users with large or scattered music collections
49 stars 19 forks source link

build: An illegal reflective access operation has occurred #2039

Open bflorat opened 5 years ago

bflorat commented 5 years ago

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
DavidPerezIngeniero commented 4 years ago

This warning is harmless. The app continues to work.

gkerdal commented 4 years ago

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 commented 4 years ago

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

gkerdal commented 4 years ago

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 commented 4 years ago

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

gkerdal commented 4 years ago

I agree