OpenJDK is licensed under the GPL v2 with exceptions.

The exceptions are:
  - "CLASSPATH" EXCEPTION TO THE GPL
  - OPENJDK ASSEMBLY EXCEPTION

Various third party code in OpenJDK is licensed under different licenses.
