fast-serialization
fast-serialization copied to clipboard
Not support JDK 17 LTS
version: 3.0.3-jdk17
one or more runtime commands like this one should work.. --add-opens=java.base/java.lang=ALL-UNNAMED
Strong Encapsulation in the JDK Java 17 LTS https://github.com/RuedigerMoeller/fast-serialization/issues/312#
Why doesn't it work on the simplest example? I use jdk 17 with
--add-opens=java.base/java.lang=ALL-UNNAMED
Why doesn't it work on the simplest example? I use jdk 17 with --add-opens=java.base/java.lang=ALL-UNNAMED
everything works fine on 1.8....
I also run in jdk17 with --add-opens=java.base/java.lang=ALL-UNNAMED, but it's also has the problem
This is the run commands I use, but those are related to my project
--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.math=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.sql/java.sql=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio=ALL-UNNAMED --add-opens=java.desktop/java.awt.geom=ALL-UNNAMED --add-opens=java.desktop/sun.awt.shell=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED --add-exports=java.desktop/sun.awt.image=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED
We're using 3.0.3-jdk17
. And it doesn't work without these JVM arguments (related for our requirements):
--add-opens=java.base/java.time=ALL-UNNAMED
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.math=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED
--add-opens=java.base/java.net=ALL-UNNAMED
--add-opens=java.base/java.text=ALL-UNNAMED
--add-opens=java.sql/java.sql=ALL-UNNAMED
I am not familiar with the internals of FST, but luckily I use with much of success the 2.57 version with the latest java-17 additions from 3.0.3-jdk17 branch. Some other selected pull requests added also, I do not know what bugs or side effects this might rise.
edit: Here is a link to sources: [2.57-jdk17-backport-experimental] (https://github.com/istinnstudio/fast-serialization-2.57-java17)
A fork to include those mods for those who might find it useful. I use 2.57 because 3.0 version breaks all my serialized files and for the time being I am too lazy to write a mass file converter (as suggested by author). Use it with extreme caution.
I tried to make it as easy as possible to use FST with Java 17 using a small example project: https://github.com/ndrsf/fst-java17 But I didn't find a production-ready way to use FST without passing the JVM parameters.
Any updates on this issue? Using version 3.0.4-jdk17
doesn't appear to help.
I do not think there is an other way other than "--add-opens" and probably it will stay this way for ever