Java looks for an actual display plugged into the Mac mini in order for it to install without error. However, none of the Mac servers in a data center environment like at MacStadium have physical displays connected.
As a solution, we have verified that installing a GPU enabler dongle — which we include as a free add-on to all Mac subscriptions — will convince macOS a display plugged in. This allows Java to install without error. Other benefits of the GPU enabler dongle including performance improvements and increased resolutions are noted in our blog.