OpenMRS on Java 8

Now that Java 8 is out, we would love to leverage it in OpenMRS. It will be a while before we can leverage new language features in core, but for now we should start testing how things do work.

Please note any findings here about:

  • Building OpenMRS under Java 8
  • Building OpenMRS under Java 8 with Java 6 compliance
  • Running OpenMRS on Java 8 (after building with Java 6)
  • Running OpenMRS on Java 8

See this long dev list thread.


If you are planning to use a different target jvm, keep in mind that:

Note: Merely setting the target option does not guarantee that your code actually runs on a JRE with the specified version. The pitfall is unintended usage of APIs that only exist in later JREs which would make your code fail at runtime with a linkage error. To avoid this issue, you can either configure the compiler’s boot classpath to match the target JRE or use the Animal Sniffer Maven Plugin to verify your code doesn’t use unintended APIs.


1 Like