After switching to JME v3.4.0-alpha6 I am getting this error when using Lemur
java.lang.IllegalAccessError: class com.simsilica.lemur.event.KeyAction tried to access private method 'void com.jme3.input.KeyNames.<init>()' (com.simsilica.lemur.event.KeyAction and com.jme3.input.KeyNames are in unnamed module of loader 'app')
at com.simsilica.lemur.event.KeyAction.<clinit>(KeyAction.java:52) ~[lemur-1.15.0-SNAPSHOT.jar:?]
at com.simsilica.lemur.component.TextEntryComponent.<clinit>(TextEntryComponent.java:106) ~[lemur-1.15.0-SNAPSHOT.jar:?]
at com.simsilica.lemur.TextField.createTextEntryComponent(TextField.java:130) ~[lemur-1.15.0-SNAPSHOT.jar:?]
at com.simsilica.lemur.TextField.setDocumentModel(TextField.java:123) ~[lemur-1.15.0-SNAPSHOT.jar:?]
at com.simsilica.lemur.TextField.<init>(TextField.java:109) ~[lemur-1.15.0-SNAPSHOT.jar:?]
at com.simsilica.lemur.TextField.<init>(TextField.java:73) ~[lemur-1.15.0-SNAPSHOT.jar:?]
at game.LoginState.initialize(LoginState.java:167) ~[main/:?]
at com.jme3.app.state.BaseAppState.initialize(BaseAppState.java:132) ~[jme3-core-3.4.0-alpha6.jar:3.4.0-alpha6]
at com.jme3.app.state.AppStateManager.initializePending(AppStateManager.java:316) ~[jme3-core-3.4.0-alpha6.jar:3.4.0-alpha6]
at com.jme3.app.state.AppStateManager.update(AppStateManager.java:346) ~[jme3-core-3.4.0-alpha6.jar:3.4.0-alpha6]
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:254) ~[jme3-core-3.4.0-alpha6.jar:3.4.0-alpha6]
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:160) ~[jme3-lwjgl-3.4.0-alpha6.jar:3.4.0-alpha6]
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:196) ~[jme3-lwjgl-3.4.0-alpha6.jar:3.4.0-alpha6]
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:242) ~[jme3-lwjgl-3.4.0-alpha6.jar:3.4.0-alpha6]
at java.base/java.lang.Thread.run(Thread.java:832) [?:?]
I noticed KeyNames.java class recently modified (a private no-arg constructor added)
in this commit
Seems KeyAction class is instantiating it (for some reason?) here
and then using it here
which could/can be replaced by a static method call
Used to be that there was no static getName() method and so the only way to get them was to instantiate a KeyNames.
Itās unfortunate that this breaking change means that Lemur will not support JME 3.4 for the near to mid future since Iām unable to release new Lemur versions until I take the hours/days that it takes to move to maven central.
I hope perhaps that this can be put back and deprecated instead.
Edit: the commit doesnāt mention an issue number so Iām not sure where to add a comment about putting the constructor back but deprecating it.
By the way, if you wanted to submit a PR for Lemur with the change, I will review+apply it as soon as Iām able.
Iāve made a comment on the KeyNames commit hoping we can put the constructor back as deprecated for 3.4ā¦ but in the mean time we can fix Lemur for folks who build from source.
It should have beenā¦ I suspect the original issue was a typo or close to it. I donāt want to speculate about vague memories I have about conversations from that time period so weāll leave it at that.
A public constructor marked deprecated would at least kick out warnings.
Edit: and note, the non-static getName() goes all the way back to 3.0 or somethingā¦ 3.1 it was made static, I guess.