0

Our company is planning to move towards AdoptOpenJdk 11 from Oracle JDK8 with Wildfly 10 running on it. All the code and wildfly server will be same(written and supported by JDK8) and since java is backward compatible, I think that it should work theoretically, but are there any issues that we have to be aware of?

Zeus
  • 6,386
  • 6
  • 54
  • 89
  • 1
    It is a very interesting topic but unfortunately against the rules of SO : Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it. – Yassin Hajaj Mar 13 '19 at 18:44
  • 1
    Quick answer: have you used Sun classes? You'll need to refactor them out. Do you want to use modules? A lot of work ahead. Drop-in replacement? All good. (you might find some pre-packaged dependencies have been moved out with JEE, so you'll need to add them as compile dependencies) – LppEdd Mar 13 '19 at 18:47
  • 2
    Java 11 is not fully backwards compatible to Java 8. A lot of classes have been removed, the structure of the JDK and the JRE is different and many more. Just look through the questions tagged `java-11`. – Robert Mar 13 '19 at 18:53
  • Thanks Every one for their insight, I think I know the answer I'm looking for. – Zeus Mar 13 '19 at 19:00
  • @Robert the structure is different but modules are not mandatory. Automatic/unnamed modules works the same way as a pre JDK9 solution – LppEdd Mar 13 '19 at 19:27
  • Duplicate of: [*Change from Java 8 to Java 11/12*](https://stackoverflow.com/q/55115175/642706) – Basil Bourque Mar 13 '19 at 21:55
  • @LppEdd Then try to run a project on Java 11 that uses Jaxb, JavaFX, Java WebStart, JavaEE or classes form com.sun.* and let's see what happens. – Robert Mar 14 '19 at 07:34
  • @Robert that's what I wrote two comments above infact. But that doesn't mean not being compatible. It just requires compile dependencies instead of being prepackaged – LppEdd Mar 14 '19 at 07:37

2 Answers2

1

There are a lot of updates from JDK 8 to JDK 11. I would recommend just moving to AdoptOpenJdk 8 in the short term. Your specific code may be ok, but you also have a huge set of dependencies that may be using something that needs updated. For example, what is your build tool? Gradle needed to be updated because it needed a newer version of ASM. Are you using JAX-RS? Jersey 2.27 doesn't work on Java 11.

JavaEE is in a weird place right now because Oracle basically dumped it on the Eclipse foundation (now called JakartaEE). It will take a little while for it to be sorted out.

Joshua
  • 26,234
  • 22
  • 77
  • 106
  • That's a great insight. I also read in the comments above that a lot of classes have been removed, so, it is not straight forward update of the JDK for us. I should wait out for all the libraries to support them. – Zeus Mar 13 '19 at 18:57
0

I have migrated from openjdk-8 to openjdk-11.
Steps I follow:
1. Add missing Java dependencies in jdk11
2. Upgrade/remove supported plugins (Need to upgrade ASM to 7.1, cglib or other byte manipulation libs)
3. Change JAVA_OPTIONS related to GC.
4. Wildfly support for java11

More details on libs versions check the link

dkb
  • 4,389
  • 4
  • 36
  • 54