Open JLLeitschuh opened 7 years ago
a) I haven't tried yet. It probably won't work with modules out of the box due to new reflection limitations. b) fst is api compatible, the serialized objects however are not compatible to stock jdk serialization
Also, JDK 9 removed/moved sun.misc.Unsafe
which means that it won't work.
That's right. It will be portable, but probably a specialized build will be necessary as AFAIK multi version jars will not work with jdk 8 and lower.
As FST can work without Unsafe (fallback code in case Unsafe is null), there is a chance it runs out of the box .. or with minor changes such as turning off Unsafe usage. Ofc jdk9 modules won't work
unsafe is still there but has moved https://dzone.com/articles/using-sunmiscunsafe-in-java-9-1
I made a branch 'jdk9' which actually compiles with java 9. Unfortunately memory mapped files do not work (because of removed AFAIK unreplaceable internal API). Serialization works, but generates WARNING: An illegal reflective access operation has occurred
on System.err. I don't know how to workaround this reasonably (without strange --add-opens commandline).
Anybody has an idea ?
Serialization ofc requires "deep" reflective access to various packages, how can I "legalize" this ?
Does this work in JDK 9? Are the generated objects compatible with JDK 9 serialization?