I'm developing a web application with Spring (and Spring Boot) and Open JDK 11 and I'm very confused about their licenses and how I can combine them.
Open JDK 11 is released under GPL GNU 2 (with classpath excpetion) while Spring is released under Apache 2.0 license. I read that this two licenses are incopatible: Apache 2.0 is compatible only with GPL GNU 3 so I can't release my application with GPL2. But if I choose to realease the application under GPL3, can I use in this application software under GPL2 and Apache2.0? I don't understand if the incompatible is referred to use this two licences together or just when I decide under which license release my application (in this case, I can't release under GPL2).
I know that maybe my question isn't so clear (as I said before, I'm very confused about this topic) so I leave this little scheme (it's like a box). This scheme represents what I'm asking for: if it's possibile to make something like this or not.
GPL 3 (application license)
|-----------------------------------------|
|--Included software's licence --|
|-- GPL2 ------------------------------|
|-- Apache2.0 -----------------------|
|-----------------------------------------|
Of course, if you need further informations and details, I'll try to be the clearest possible.