The code is GPL, but the official Oracle binaries are not (since Oracle owns the copyright, they are free to release under multiple different licenses) and they use Oracle's predatory "free" licensing - you când download and run for free for 6 months, but you owe them money if you keep running those binaries after the moment the new version is released. There is no explicit enforcement mechanism - it's up to you to be careful, otherwise their lawyers will notice at some point and bill you for all the times you weren't.