简体   繁体   中英

Libgdx desktop does not run - WARNING: An illegal reflective access operation has occurred

I'm following this tutorial ( http://www.kilobolt.com/day-2-setting-up-libgdx.html ). But in step 18 where I run the project as a java application, I get the following errors:

在此处输入图片说明

I've tried looking around but found no solution for the errors i had.

Any ideas?

Edit:

Running a java --version returns

openjdk 11.0.4 2019-07-16
OpenJDK Runtime Environment (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3)
OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3, mixed mode, sharing)

My libgdx version is 1.9.10 which i think is the newest?

What version of libgdx and java are you using?


For the error check this question

Like you the questioner used libgdx under ubuntu with a newer version of the open jdk .
Downgrading to version 8 seemed to have resolved that issue.


The warnings basically says something along the lines that the underlying code uses functionality that has been deprecated and is pending for removal. Using a newer version of libgdx might solves that issue.

However some of those issues might not be resolved as libgdx does not seem to be under (much) active development anymore. The usual recommondetation is to not use anything beyond JDK 8 .

According to the repo (for example this ) 1.9.10 is indeed the latest version.

Note as well that those are just warnings you could potentially igore. However as your are facing other issues with the open-jdk implementation ignoring them is not an option for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM