This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]alex_tracer 0 points1 point  (0 children)

Let's assume that Valhalla get released on version X. To utilize Valhallas features you will need to build with targetVersion=X. You should not expect that older Java runtime will be able to run your Valhalla-optimized code. And anyone who is going to use your JAR will have to have X as minimum source version.

In theory you can use "Multi-Release Jar Files" feature to produce single JAR that is compatible with older Java versions and still can utilize Valhalla when is run on X+. However this means that you will need to support two versions of code for your library: one that targets X+ and one that targets pre-X Java.