You'll need Solaris Studio 12.4 in order to build it. It is based on a
script published at [1] and on the information published at [2] and [3].
As OpenJDK of version n needs version n-1 for compilation, the whole
thing takes a while.
Unfortunately, the OpenJDK people seem to have removed Solaris support
beginning with version 15, so OpenJDK 14 seems to be the latest version
available: