That error almost always means Java isn't installed, or the installed copy is broken.
Start by installing a current Java runtime from the official source, then restart your browser or launcher so it picks up the new version. If Java is already installed, reinstall it — a partial or outdated install produces exactly this message.
If it persists after that, the usual culprit is a launcher trying to allocate more memory than your system can spare. Look for a memory setting in the launcher options and lower it.