Illegal reflective access warning

I’m new. This code gives the below warning, why? My deps: sio2-1.7.0, slf4j-simple-2.0.0-alpha7-sources, lemur-1.16.0, guava-31.1-jre, failureaccess-1.0.1, openJDK 15.

public class ClientWindow extends SimpleApplication {
    private boolean isRunning = true;
    protected Geometry player;
    
    @Override
    public void simpleInitApp() {
        Box b = new Box(1, 1, 1);
        player = new Geometry("Player", b);
        Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        mat.setColor("Color", ColorRGBA.Blue);
        player.setMaterial(mat);
        rootNode.attachChild(player);
        initKeys(); // load my custom keybinding
     }

    private void initKeys() {
        // You can map one or several inputs to one named action
        //inputManager.deleteMapping( SimpleApplication.INPUT_MAPPING_MEMORY );
        inputManager.addMapping("Up",  new KeyTrigger(KeyInput.KEY_W),
                                                    new KeyTrigger(KeyInput.KEY_UP));
        inputManager.addMapping("Left",   new KeyTrigger(KeyInput.KEY_A),
                                                        new KeyTrigger(KeyInput.KEY_LEFT));
        inputManager.addMapping("Right",  new KeyTrigger(KeyInput.KEY_D),
                                                        new KeyTrigger(KeyInput.KEY_RIGHT));
        inputManager.addMapping("Down", new KeyTrigger(KeyInput.KEY_S),
                new KeyTrigger(KeyInput.KEY_DOWN));
        // Add the names to the action listener.
        
        inputManager.addListener(actionListener, "Up", "Left", "Right", "Down");
        // inputManager.addListener(analogListener, "Up", "Left", "Right", "Down");
    }

    
    private final ActionListener actionListener = new ActionListener() {
        @Override
        public void onAction(String name, boolean keyPressed, float tfp) {
            if(isRunning){ 
                float value=0.4f;//arbitrary offset for now.
                if (name.equals("Up") && !keyPressed ) {
                    Vector3f v = player.getLocalTranslation();
                    player.setLocalTranslation(v.x, v.y + value /** speed*/, v.z);

                }
                if (name.equals("Down")&& !keyPressed) {
                    Vector3f v = player.getLocalTranslation();
                    player.setLocalTranslation(v.x, v.y - value /** speed*/, v.z);
                }
                if (name.equals("Right")&& !keyPressed) {
                    Vector3f v = player.getLocalTranslation();
                    player.setLocalTranslation(v.x - value /** speed*/, v.y, v.z);
                }
                if (name.equals("Left")&& !keyPressed) {
                    Vector3f v = player.getLocalTranslation();
                    player.setLocalTranslation(v.x + value /** speed*/, v.y, v.z);
                }
            }
        }
    };

    @Override
    public void simpleUpdate(float tpf) {
        //TODO: add update code
    }

maj 24, 2022 2:19:46 FM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.5.2-stable

  • Branch: HEAD
  • Git Hash: 8ab3d24
  • Build Date: 2022-04-21
    maj 24, 2022 2:19:46 FM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
    INFO: LWJGL 2.9.3 context running on thread jME3 Main
  • Graphics Adapter: null
  • Driver Version: null
  • Scaling Factor: 1
    WARNING: An illegal reflective access operation has occurred
    WARNING: Illegal reflective access by com.jme3.util.ReflectionAllocator (file:/Users/erik/Documents/Dev/jME3/lib/jme3-core.jar) to method sun.nio.ch.DirectBuffer.cleaner()
    WARNING: Please consider reporting this to the maintainers of com.jme3.util.ReflectionAllocator
    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
    maj 24, 2022 2:19:46 FM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
    INFO: OpenGL Renderer Information
  • Vendor: Intel Inc.
  • Renderer: Intel Iris OpenGL Engine
  • OpenGL Version: 2.1 INTEL-16.5.9
  • GLSL Version: 1.20
  • Profile: Compatibility
    maj 24, 2022 2:19:47 FM com.jme3.audio.openal.ALAudioRenderer initOpenAL
    INFO: Audio Renderer Information
  • Device: Built-in Output
  • Vendor: Apple Computer Inc.
  • Renderer: Software
  • Version: 1.1
  • Supported channels: 64
  • ALC extensions: ALC_EXT_CAPTURE ALC_ENUMERATION_EXT ALC_EXT_MAC_OSX ALC_EXT_ASA ALC_EXT_ASA_DISTORTION ALC_EXT_ASA_ROGER_BEEP
  • AL extensions: AL_EXT_OFFSET AL_EXT_LINEAR_DISTANCE AL_EXT_EXPONENT_DISTANCE AL_EXT_float32 AL_EXT_STATIC_BUFFER AL_EXT_SOURCE_NOTIFICATIONS AL_EXT_SOURCE_SPATIALIZATION
    maj 24, 2022 2:19:47 FM com.jme3.audio.openal.ALAudioRenderer initOpenAL
    WARNING: Pausing audio device not supported.
    maj 24, 2022 2:19:47 FM com.jme3.audio.openal.ALAudioRenderer initOpenAL
    WARNING: OpenAL EFX not available! Audio effects won’t work.
1 Like

Thank you for reporting, don’t worry, this is an on-going fix, see for more :

1 Like

Thanks for the link!