Menu

Illegal reflective access

Help
ihe63
2023-09-11
2024-07-18
  • ihe63

    ihe63 - 2023-09-11

    Hi,

    I'm successfully using JWebBrowser on 32 bit Linux (Centos 6) with the Mozilla interface. Occasionally, the browser will freeze and I see this written to the console:

    Native Command: [/usr/java/jdk-11.0.17/bin/java, -client, -Xms512m, -Xmx2048m, -Djava.library.path=/usr/local/javapos/wn/bin:::/opt/EpsonJavaPOS/bin:/opt/nextor/lib/psc:/opt/nextor/lib/psc/SupportJars:/opt/nextor/lib/jai:/usr/java/packages/lib:/lib:/usr/lib, -Dnativeswing.peervm.debug.printStartMessage=true, -Dnativeswing.localhostAddress=127.0.0.1, -classpath, /opt/nextor/lib/djnativeswing_102/DJNativeSwing.jar:/opt/nextor/lib/djnativeswing_102/DJNativeSwing-SWT.jar:/opt/nextor/lib/djnativeswing_102/swt-4_5_2.jar:/opt/nextor/lib/djnativeswing_102/MozillaInterfaces-3.6.28.jar, chrriis.dj.nativeswing.swtimpl.NativeInterface, 1, 35819]
    NativeSwing[1]: Starting peer VM #1
    WARNING: An illegal reflective access operation has occurred
    WARNING: Illegal reflective access by chrriis.dj.nativeswing.swtimpl.core.MessagingInterface (file:/opt/nextor/lib/djnativeswing_102/DJNativeSwing-SWT.jar) to method java.awt.EventQueue.dispatchEvent(java.awt.AWTEvent)
    WARNING: Please consider reporting this to the maintainers of chrriis.dj.nativeswing.swtimpl.core.MessagingInterface
    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
    

    Does anyone know what the cause is and how to fix it?
    Thanks!

     
  • Christopher Deckers

    Hi,

    Sorry for the late reply...

    For now, this is just a warning. This is due to the module system introduced in Java 9.
    Perhaps I could pass "--add-opens=java.base/java.lang=ALL-UNNAMED" when I spawn the process responsible for the native stuff to get rid of the warning, but then I also need to test the version of Java to not use that option if < Java 9.

    Hope this helps,
    -Christopher

     
  • ihe63

    ihe63 - 2024-07-18

    Hi Chris,

    I've been monitoring this problem for a while, and the issue is not so much that it's a warning, but that when it occurs, the browser freezes for about 90 seconds, after which control is passed back to my app and it continues normally. Perhaps there's a code path that both leads to the reflective access warning and to this condition? I tried upgrading to 1.03 and the issue persists.

    Thanks for any help,
    Ithran

     

Log in to post a comment.

MongoDB Logo MongoDB