minecraft forge and optifine not working

thanks for your time. So I just installed forge for 1.7.10 and 1.12.2 AND optifine for 1.14, but every time I try to launch minecraft it gives out this error:

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release. Exception in thread “main” java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$ AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$ AppClassLoader and java.net.URLClassLoader are in module java.base of loader ‘bootstrap’) at net.minecraft.launchwrapper.Launch.(Launch.java:34) at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

Thanks so much for your help, Daniel