There was a time (around the beginnings of Mac OS X) when Java was considered a first class citizen in Mac OS X, next to Objective-C.
Some NeXT products like WebObjects got ported to Java (and ran not only the iTunes backend but also things like the original Dell online store) and there was something called the Java bridge which allowed you to program Cocoa applications with Java.
https://developer.apple.com/library/archive/documentation/Co...
Oh, and with Yellow Box for Windows, this was also possible on Windows.
If you look at the screenshots here, it's mostly Windows 2000: https://developer.apple.com/library/archive/documentation/Le...
It wasn't just Apple, in the late 90s/early 2000s there was a not insignificant number of folks in business/academia who thought Java would take over the world. Windows XP also shipped with an embedded JVM for running Java apps out of the box at one stage too, just before Microsoft doubled down on c#/.NET.
Along with MacOS X, Apple's Xcode IDE even had native java project support briefly in this era as well.