Use OpenJDK!
Never touch anything from Oracle.
Then you will be fine.
Oracle is the company that wants you to buy a license for your MariaDB(!) instance running on a small AWS instance! Yep, that happened.
Source: have worked with Java for years, three of those around Oracle products.