Java 11 Compatibility

I have a Java application making use of the Java SDK, but have run into an issue recently after migrating from JRE8 to JRE11. I am getting a java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter error within the library. This makes sense because JRE11 removed these modules (see http://openjdk.java.net/jeps/320).

Is there any plan to make the client SDK compatible with Java 11, which is the current LTS release?

I have looked over the client source in GitHub and I only came across one (1) import of javax.xml and it was inside the AppClient.java class, specifically importing the javax.xml.bind.DatatypeConverter class. Within there, it looks like the DatatypeConverter is only used to encode a String. Java 8 introduced Base64 encoding capabilities natively with the java.util.Base64 class.

Obviously this means that the client would need to target compatibility with Java 8 instead of Java 7. The Java SDK page already calls out Java 8 support is required for Android, but it is not clear how this requirement would translate for standard Java clients.

Or do I need to look into other solutions like spinning up a container with Java 7/8 just for the PureCloud client?

Hi Ryan,

I am going to bring this up at our team meeting tomorrow. I can't quite give you an answer until I talk this with our engineering lead. When we migrated from Java 8 -> 11 on our internal APIs, we ran into several compatibility issues that we had to mitigate. We want to make sure that whatever we do, we do not introduce a breaking change for our existing API consumers.

Let me get back to your tomorrow with hopefully a better answer.

Thanks,
John Carnell,
Manager, Developer Engagement

Hi Ryan,

I am just following up with you on the conversation from yesterday. Upgrading JDKs used in our APIs are always a tricky business, especially when we have diverse user community. No matter what we do, we end up breaking someone. So here is where we are at:

  1. We have no plans to upgrade our JDK off of JDK 8 this year.
  2. Next year we are going to be moving our APIs to use Open API 3.0. This is a big piece of work we are looking at and we will be switching to a new version of Java then (we have not decided what version we are using yet). This work will probably begin sometime in Q2.

At this point, if you truly have to isolate your code and run on JDK 8 leveraging a container is probably your best bet.

Thanks,
John

Thank you for the reply, but I think my query was confused. The current client SDK is targeting Java 7 (at least according to the build.gradle file).

From ./build/build.gradle:

apply plugin: 'java'
apply plugin: 'maven'

sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7

I was curious if the SDK could target Java 8, but refrain from using modules that have been removed in Java 11.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.