Upgrading From jdk 8 to OpenJDK 11

If we wait till 2023 to upgrade , there will be more stuff to fix and will be more painful than now. Also openn jdk 12 will not be the latest by that time . I think its better to start upgrading soon.

1 Like

cc @dkayiwa , @dev4 @dev5 , whats your conclusion on this Ugrade??

  • If we decide to updrade to java 11, we shall need some code refactoring to be compatible will java 11 and if possible backward compatible will java 8. Simply because , research shows java 8 has been the most used version of java by java clients , considering all the way from java 1 to12

  • or we stick with java 8 for now??

What you take on this??

Also do ensure to maintain backwards compatibility with JDK 8. With UgandaEMR we have just completed a migration from JDK 7 & currently have over 1000 sites running, and cannot change for at least another 2 years.

1 Like

ya , thats really key

Do you have details of the exact changes that we would need to support Java 11?

1 Like

here in this talk post

One major change that affects us was the replacement of the Doclet API in java 11 with a new Doclet Api. So we would need to refactor all our code that depended to the old API , to depend on the new Doclet API

Does everything else compile on Java 11 if you delete the ShouldTaglet.java file?

From the infrastructure point of view, moving to OpenJDK 11 really helps me a lot to support CI capabilities.

The older the JDK, the more likely it’s not supported by the distribution we have.I’m having a lot of trouble supporting JDK 7 already.


@dkayiwa let me try deleting that file and run it again and see if it compiles.

1 Like

@irenyak1 i was actually going to ping you. and delete all acurrances where that method is called

OpenJDK 11 is available in CI for those interested.

1 Like

@dkayiwa this is what I get after deleting ShouldTaglet.java file . Error

Can you try this and see if it compiles? https://stackoverflow.com/questions/46493613/what-is-the-replacement-for-javax-activation-package-in-java-9

Thanks @dkayiwa for the link, on top of that I am looking through this link too.

After updating the javax.activation I was left with two errors from the five errors I have been having.

From that other link i want to include javax.annotation then run and see how it goes

the javax.annotation package that I have added to the main pom.xml is


and I have added this to the openmrs-api pom


However this is the error I am getting

From this I think the dependency has been accepted

[DEBUG] /home/irynah/.m2/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar

1 Like

@irenyak1 how far with this work ??

Still trying my best though tests are failing. please review the post of the error up. @mozzy

@irenyak1 Are you still experiencing any blockers?

Yes @c.antwi I am .