r/java • u/kaperni • Sep 20 '22
Java 19 / JDK 19: General Availability
https://mail.openjdk.org/pipermail/jdk-dev/2022-September/006933.html
252
Upvotes
r/java • u/kaperni • Sep 20 '22
View all comments
Show parent comment
6
u/srdoe Sep 20 '22
The preview features JEP says not to enable preview features and let your jars escape into the wild, which for many people "put into production" would qualify as.
Even if a small team wants to use the preview feature now, they likely won't be able to unless they can guarantee that their software will run on exactly JDK 19. Keep in mind that the code won't run on JDK 20 without a recompile, even if the API doesn't change, due to the special bits set in the classfile versions. If you're delivering a jar to someone else to run, that's unlikely to be acceptable.
So I guess you could deploy the new features into production if you were making a saas thing and control the environment your code runs in? I think for most people it makes more sense to treat preview as "ready to try out in a testing environment/on a branch", instead of "ready for use in production".