简体   繁体   中英

Jython registering class with kryonet

I want to register a python/jython class with kryonet. I get this Error when I try it:

TypeError: register(): 1st arg can't be coerced to com.esotericsoftware.kryo.Registration, java.lang.Class

using kr.register(MyPythonClass)

is it somehow possible to let kryonet serialize python classes?

Try:

kr.register(MyPythonClass.__class__)

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