JAVA 11: "illegal reflective access" warning

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

JAVA 11: "illegal reflective access" warning

blueencoder
This post was updated on .
Hi,

at application run-time, when calling Platform.getOSAndArch() with a JAVA11 RTE (Oracle, OpenJDK) a warning is printed through StdErr:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.jogamp.common.os.NativeLibrary$3 (file:/C:/Users/.../gluegen-rt.jar) to method java.lang.ClassLoader.findLibrary(java.lang.String)
WARNING: Please consider reporting this to the maintainers of com.jogamp.common.os.NativeLibrary$3
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


I am using gluegen v2.3.2 (commit cc1e9bc).
My application runs under Windows 7 / 10.
Everything is still working with JAVA 11, but I am afraid that with a not too far in the future release of JAVA gluegen might fail to run properly.
Because the last release of gluegen was in 2015, I wonder if it is still worked on...

Greetings,
Markus

Stacktrace:
WARNING: Illegal reflective access by com.jogamp.common.os.NativeLibrary$3 (file:/.../gluegen-rt.jar) to method java.lang.ClassLoader.findLibrary(java.lang.String)
        at com.jogamp.common.os.NativeLibrary$3.run(NativeLibrary.java:603)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at com.jogamp.common.os.NativeLibrary.findLibraryImpl(NativeLibrary.java:597)
        at com.jogamp.common.os.NativeLibrary.findLibrary(NativeLibrary.java:642)
        at com.jogamp.common.os.NativeLibrary.enumerateLibraryPaths(NativeLibrary.java:431)
        at com.jogamp.common.os.NativeLibrary.enumerateLibraryPaths(NativeLibrary.java:390)
        at jogamp.common.os.PlatformPropsImpl.findSysLib(PlatformPropsImpl.java:449)
        at jogamp.common.os.PlatformPropsImpl.queryElfFile(PlatformPropsImpl.java:404)
        at jogamp.common.os.PlatformPropsImpl.access$000(PlatformPropsImpl.java:38)
        at jogamp.common.os.PlatformPropsImpl$1.run(PlatformPropsImpl.java:165)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at jogamp.common.os.PlatformPropsImpl.<clinit>(PlatformPropsImpl.java:160)
        at xxx.XXX.main(XXX.java:160)
Reply | Threaded
Open this post in threaded view
|

Re: JAVA 11: "illegal reflective access" warning

Sven Gothel
Administrator
Thank you Markus,

surely worth a bug report entry, to be fixed.

Cheers,

~Sven

On 12/20/18 1:29 PM, blueencoder [via jogamp] wrote:

> Hi,
>
> at application run-time, when calling Platform.getOSAndArch() with a JAVA11
> RTE (Oracle, OpenJDK) a warning is printed through StdErr:
>
> /WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by com.jogamp.common.os.NativeLibrary$3
> (file:/C:/Users/.../gluegen-rt.jar) to method
> java.lang.ClassLoader.findLibrary(java.lang.String)
> WARNING: Please consider reporting this to the maintainers of
> com.jogamp.common.os.NativeLibrary$3
> 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*/
>
> I am using gluegen v2.3.2 (commit cc1e9bc).
> My application runs under Windows 7 / 10.
> Everything is still working with JAVA 11, but I am afraid that with a not too
> far in the future release of JAVA gluegen might fail to run properly.
> Because the last release of gluegen was in 2015, I wonder if it is still
> worked on...
>
> Greetings,
> Markus
>
> ------------------------------------------------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: JAVA 11: "illegal reflective access" warning

gouessej
Administrator
It's mentioned in this bug report:
https://jogamp.org/bugzilla/show_bug.cgi?id=1317
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JAVA 11: "illegal reflective access" warning

Wade Walker
Administrator
In reply to this post by blueencoder
I'm working on trying to compile gluegen/jogl/jocl with Java 11. If that works, I was planning to look at this bug, since I've been seeing it too in my own application.