Java, introduced by Sun Microsystems in 1995, was ‘free’ for general purpose computing. Oracle acquired Sun in 2009 and continued the same policy till 2019. From early 2019, Oracle changed the policy for commercial use of Java. They changed it again in October 2022 & January 2023.
There’s confusion in the market. Customers are not aware of what they need to do and for what versions or installations of Java they need to pay or not pay.