How to fix Java Install error for minecraft forge?

Solution 1:

The install is trying to use the Pack200 class, but this has deprecated for some time and has now been removed from Java 14 - see JEP 367

You will have to use an older version of Java to run the install.