How to get java

I want to install mods for Minecraft on my computer but to that I need Minecraft forge and for that I need java. I have looked online for ways to get java on my computer but they don’t work

please respond as soon as possible

Install mods the by dropping them in ~/.var/app/com.mojang.Minecraft/.minecraft/ rather than ~/.minecraft

The Endless OS is only compatible with Flatpak Applications. At the moment Minecraft Forge doesn’t have a Flatpak version

Did the information provided by Leandro worked?

hi i legit just woke up i am about to to try it

it didn’t work I need help installing the mod