Replies: 8 comments 3 replies
-
|
Thanks for presenting this interesting idea. One question: can we replace org.ehcache with another library that works better with JAVA 17 and doesn't require this JAVA_OPTS env variable? |
Beta Was this translation helpful? Give feedback.
-
|
I agree with Chen. I like Java 17, but I don't want to have the extra JAVA_OPTS. |
Beta Was this translation helpful? Give feedback.
-
|
I am exploring the alternatives of Ehcache. And I also saw that Ehcache's maintainers were aware of this issue already: ehcache/ehcache3#3008. |
Beta Was this translation helpful? Give feedback.
-
|
Another compatibility issue: after switching to Java 17, the following issue will come out because of Arrow: The solution is: set the This solution is explicitly required in Arrow's official document: https://arrow.apache.org/docs/java/install.html. @chenlica and @aglinxinyuan are you guys fine with this one? |
Beta Was this translation helpful? Give feedback.
-
|
A general question is whether it's a good practice to use JDK_JAVA_OPTIONS to "solve" these problems. I want to know other members' opinions. |
Beta Was this translation helpful? Give feedback.
-
|
I think it is definitely a good direction to support jdk 17. I don't see problems of using |
Beta Was this translation helpful? Give feedback.
-
|
Lots of your dependencies dropped Java 8 and 11 support years ago, eg jooq. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks, @pjfanning . @bobbai00 Can you suggest a plan? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Motivation
Currently, Scala/Java based micro services run in Java 11.
Compared to Java 11, Java 17 is better at both language level and runtime & GC performance.
Besides that, modern Java libraries usually require Java 17+, including some GenAI component like mcp-java-sdk. If later we want to use these libraries, our existing Java/Scala code has to support Java 17.
How hard it is to support Java 17
It turns out that it is very easy to support Java 17. During some testing, the only incompatibility I encountered is
org.ehcache.sizeOfwe used incommon/workflow-core/src/main/scala/org/apache/amber/core/tuple/Tuple.scala:The incompatibility is because: Ehcache manages byte based cache limits by utilizing reflection, which is forbidden with Java 17. The error message is the following:
To solve it, one simple solution is to set the
JAVA_OPTSenv variable as:Summary
Beta Was this translation helpful? Give feedback.
All reactions