Problems with building OpenMRS with JDK 8 and Jetty

Note that you can’t run older OpenMRS versions on Java 8 in Jetty, apparently the compiler that Jetty uses to compile JSPs to servlets fails, so you need to run those versions on Java 7 and below, but I tested that in Tomcat this is not a problem.

@raff you are right that you can’t build other branches like 1.11.x on with JDK 8 but you should be able to run them which to me seems like not a problem, am not surprised, you need to use JDK 6 to build them, I believe in terms of backwards compatibility there are variations between the JDK the JRE for the same version. I believe this is the same issue this talk topic is mentioning:

1 Like

It sounds like a strange place to be to say to the users they can run on JDK 8 older branches of openmrs-core, yet our junits fail on JDK 8. Have we looked at what causes tests to fail? Can we simply upgrade jetty version to make it work on JDK 8 for older branches as well?

From a dev perspective being able to build and run all maintained branches of openmrs-core on JDK 8 with the proper java target would simplify things (less JDK switching). Our CI would continue to be testing that all compiles fine and runs against JDK 6 to eliminate possible leaking of Java 8 APIs in older branches.

1 Like

My quick guess is that we need to back port something we committed to master as part of the java 8 efforts to fix some failing tests in master which i recall as if they were the same tests as those when we first attempted the upgrade, i will dig and find what it was.