openai4j icon indicating copy to clipboard operation
openai4j copied to clipboard

Do you need to switch to a higher version of JDK?

Open Lambdua opened this issue 1 year ago • 3 comments

I am the maintainer of this open-source library, and I developed it based on the openai Java library. Currently, the JDK 8 version is no longer suitable for my own needs. I have the idea of upgrading to a higher version of the JDK to use more of its features However, this idea depends on the thoughts of the people using this library. I hope those who see this issue can provide their own opinions

Lambdua avatar May 06 '24 13:05 Lambdua

I would try and keep supporting JDK 8. The 8 and 11 versions still dominate the production applications out there. Switching to 17 would seem too risky for me, and could eventually have an impact on this library's adoption. Here a poll from next year: https://www.jetbrains.com/lp/devecosystem-2023/java/

propertius avatar May 07 '24 09:05 propertius

New projects might actually benefit from using a higher version of the JDK. For maintaining older projects, JDK 8 is perfectly reasonable. However, most projects using this library are likely relatively new. So far, there hasn't been significant demand for upgrading the JDK version. Although I personally have this need, there hasn't been much feedback on it, so upgrading the JDK isn't planned for now.

Lambdua avatar May 07 '24 14:05 Lambdua

If you want to try something experimental then you could have a look at Jabel It allows Java 9+ syntax when targeting for Java 8

Ran-Mewo avatar May 11 '24 08:05 Ran-Mewo