Designer >= 14 with Domino < 14

HCL Domino Designer 14 or higher uses Java 17 (or higher in 14.5). Your Domino servers might not all be upgraded to version 14+ yet, and up to Domino 12 it uses Java 8. So that means that you’re developing code with Java 17 and running it on a lower version. In that situation you can run into NoSuchMethod errors if you use methods that don’t exist in Java 8.

The solution is to let Designer know that you’re running on Java 8, so it takes that into account when compiling your code. You can do that by enabling the –release option in the JDK:

When enabled it does two things when you compile your application:

  • Checks your source code for methods that don’t exist in Java 8 (and will show a compilation error when it finds them).
  • Builds the code to run on Java 8.

That second option is actually why I started looking into this in the first case: in my source code I was using the ByteBuffer class. The implementation of this class changed in Java 9 and it was throwing NoSuchMethod errors. More details about that can be read here.