0

I am migrating our code from Java 8 to OpenJDK. I got different errors for different attributes like:

  • javax.xml.*
  • org.w3c.*
  • org.xml.*

I am using same settings and same libraries in Eclipse as the one with JDK 8, just changed the build path from JDK 8 to OpenJDK 11. So whebn I change the build path back to JDK 8, the errors disappear.

Even I am unable to run the application (which had build previously by JAVA 8) after set PATH and JAVA_HOME to OpenJDK 11.

I tried also with OpenJDK 9, but I got the same result.

Do I miss something, or OpenJDK doesn't support these attributes, and what is the recommendation to get it works correctly?

R.Almoued
  • 219
  • 6
  • 16

1 Answers1

1

You will need to change/update some dependencies when migrating to java 11. In this article some thorny aspects are explained:

https://winterbe.com/posts/2018/08/29/migrate-maven-projects-to-java-11-jigsaw/

Petronella
  • 2,327
  • 1
  • 15
  • 24
  • I am using ant and adding jar library manually (not using maven), so do you mean I should replaced the libraries manually? Also that means the already build software will not run bu OpenJDK? – R.Almoued May 03 '19 at 12:47
  • Sorry, don't have experience with ant. But the dependencies are for java compatibility, not Maven, so at least those should be updated. – Petronella May 03 '19 at 13:16