Minecraft Forge client 1.12.2 not working on Ubuntu 20.04

Have you tried setting system default Java to be Java 8? I recently tried using Forge 1.12.2 and it would crash instantly when you tried to start it from the launcher. Try running sudo update-alternatives --config java and type the number of Java 8 to set as default, then try starting Forge again. That fixed the problem for me, as Forge versions 1.12.2 are only compatible with Java 8.