Support for Java 17
As we advance along the OpenMRS platform roadmap, a pivotal task is the addition of support for Java 17.
This update is especially important due to the increasing number of newcomers who tend to have Java 17 pre-installed.
By accommodating Java 17, we aim to provide a more convenient experience for these users.
When adding Java 17 compatibility to the OpenMRS core, it's vital to ensure that the OpenMRS SDK can also compile and function seamlessly with Java 17.
After all, it's essential that our SDK aligns with the core's capabilities.
While I was successful in compiling the SDK with Java 17, I encountered an obstacle when attempting to run a server using the SDK.
The root cause of this issue lies in our use of the maven option '-XX:MaxPermSize' to define the size for the Permanent Generation.
It became evident that this option is unsupported with Java 17. I resolved the issue by removing these incompatible options.
Getting OpenMRS core to work with Java 17 might be a bit tricky.
When I tried to compile it, there were a bunch of test failures.
I'm going to dive into these issues and make sure OpenMRS core works with Java 17
- Resolving Java 17 Compatibility Issue for OpenMRS SDK: SDK-322
- Support for Java 17: TRUNK-6197
I implemented the changes based on feedback from my mentors, particularly Ian.
He provided valuable insights, suggesting a more streamlined approach.
His recommendation was to create a consistent NPM cache directory within the SDK's server directory naming it something unlikely to be a server name, such as '_openmrs_sdk_node_cache.'
This adjustment not only cleans up the process but also makes it more user-friendly, eliminating the need for users to search for the right 'openmrs-sdk-node' folder.
I promptly incorporated these suggestions for a more efficient solution"
Future
In the upcoming week, my primary objective is to wrap up the optimization of SDK cache management. Subsequently, I will shift my focus to the task of adding support for Java 17.
That's a wrap for this week. Thanks for following along with my progress. Catch you next week!