Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings with Java 9 #4927

Closed
1 of 7 tasks
JuKu opened this issue Oct 12, 2017 · 10 comments
Closed
1 of 7 tasks

Warnings with Java 9 #4927

JuKu opened this issue Oct 12, 2017 · 10 comments

Comments

@JuKu
Copy link

JuKu commented Oct 12, 2017

Issue details

I get an warning in logs, if i use Java 9 (in Java 8 there isnt this log).

Reproduction steps/code

Create an libGDX project and use java 9.

I have also tagged the source code:
https://github.com/leeks-and-dragons/leeks-and-dragons/tree/java-9-warnings

Version of LibGDX and/or relevant dependencies

libGDX Version 1.9.6 (newest version).

Stacktrace / Log

If i execute the game, i get the following warning log (the game works, but this warning is shown):

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.lwjgl.LWJGLUtil$3 (file:/D:/Users/<Username>/.m2/repository/org/lwjgl/lwjgl/lwjgl/2.9.2/lwjgl-2.9.2.jar) to method java.lang.ClassLoader.findLibrary(java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.lwjgl.LWJGLUtil$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

Please select the affected platforms

  • Android
  • iOS (robovm)
  • iOS (MOE)
  • HTML/GWT
  • Windows
  • Linux
  • MacOS

This was only checked with windows.

@intrigus
Copy link
Contributor

I suggest closing this as won't fix.
The problem is caused by lwjgl 2 which will not receive any updates.
Lwjgl 3 fixes all these problems, so should just ignore the warnings.
By the time that those accesses are not possible, lwjgl 3 will probably be the default libgdx backend.

@JuKu
Copy link
Author

JuKu commented Oct 13, 2017 via email

@xGnoSiSx
Copy link

Be carefull,
It's too early to rush Java 9 compatibility. Note that most people with projects here still use Java 6/7.

Even -SourceCompatibility 8 is not fully supported.

Everything written in the engine must run on Android and RoboVM - does that support Java 9? ..so good luck!!

@francogp
Copy link

francogp commented Oct 21, 2017

@JuKu I'm using LWJGL3 and libGDX use version 3.1.0, that has warnings too. LWJGL3 version 3.1.3+ fixes all warnings using java 9.
NOTE: If you get errors, is because you are configuring libGDX code in the wrong way.
@xGnoSiSx Java 9 works just fine on all my libGDX projects, using LWJGL3 (except for the illegal reflective access warning, that get fixed on LWJGL 3.1.3+).

@Tom-Ski Tom-Ski closed this as completed Oct 24, 2017
@JuKu
Copy link
Author

JuKu commented Oct 24, 2017

@francogp Thanks for your answer!
Does the newest libGDX version includes LWJGL3 3.1.3 or later?

@francogp
Copy link

@JuKu yes. That's why this issue is closed.

@JuKu
Copy link
Author

JuKu commented Oct 24, 2017

@francogp Thanks!
I am using LWJGL 2, because switching windowed and fullscreen mode doesnt work correctly with LWJGL3.
But i think i have to upgrade to fix this problem.

@francogp
Copy link

francogp commented Oct 25, 2017

@JuKu I'm using LWJGL3 on Linux and Windows, without problems on fullscreen switching. I'm only having V-Sync problems on AMD graphics card, because of libGDX implementation.

@xGnoSiSx
Copy link

I can also report no issues on fullscreen switching. The previous LWJGL update (not 3.1.3) fixed everything.
I just need to find more time to work with my codebase....

@JuKu
Copy link
Author

JuKu commented Nov 2, 2017

@francogp @xGnoSiSx thanks for your answers!
Maybe i should try LWJGL3 backend again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants