EsotericSoftware / kryonet

TCP/UDP client/server library for Java, based on Kryo
BSD 3-Clause "New" or "Revised" License
1.81k stars 415 forks source link

An illegal reflective access operation has occurred #154

Closed cpbentley closed 4 years ago

cpbentley commented 5 years ago

WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.esotericsoftware.reflectasm.AccessClassLoader (file:/Users/student5309/Java/kryonet-2.21/jars/production/onejar/kryonet-2.21-all.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) WARNING: Please consider reporting this to the maintainers of com.esotericsoftware.reflectasm.AccessClassLoader 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

I got this when running Chat client/server example

Eclipse/Java 8/kryonet 2.21 production

lewisxy commented 4 years ago

Same issue, IntelliJ/Java 10/MacOS/kryonet 2.21 production

bird-dancer commented 4 years ago

Happened to me as well. java 11, Ubuntu, release 2.21 debug

coopsmoss commented 4 years ago

I also get this, java 11, ubuntu, V 2.22.0-RC1

NathanSweet commented 4 years ago

Kryo uses unsafe operations. This is normal. If you hate the messages, you can use a workaround from here: https://github.com/EsotericSoftware/kryo/issues/692#issuecomment-595292219

TomaszGaweda commented 3 years ago

In some time usage of Unsafe will be totally prohibited. IMHO rather than ignoring the issue it would be better to have it at least open, so that people can track changes that have to be implemented in future