How do you activate JAVA in LibreOffice?

Been trying for 2 hours to activate JAVA but Office will not recognize that it is present and active.

See this answer (you haven’t mention your OS, LO version, and other info, so I have all reasons to just guess).