Java does not run in your browser any more, so you check two different things: whether a Java runtime is installed, and whether your programs can find it. Run java -version in a terminal. If it prints a version, Java is installed and usable. Browser Java plugin settings no longer exist because every major browser removed the plugin.
The old "enable Java in the browser" instructions apply to applets and Java Web Start, which are discontinued. This article shows how to verify a modern installation.
Browsers dropped the NPAPI plugin interface that applets needed: Chrome removed it in 2015, Firefox in 2017. The Applet API is deprecated for removal in current Java, and Java Web Start was removed in JDK 11. Websites that still ask you to enable Java are outdated, and the Java Control Panel's browser tab is gone from modern builds.
Do not confuse Java with JavaScript. If a page says to "enable Java" but needs interactivity, it almost always means JavaScript, which is a browser setting and is on by default.
Open a terminal (Command Prompt or PowerShell on Windows, Terminal on macOS and Linux) and run:
Example output:
If you see "command not found" or "not recognized as an internal or external command", Java is missing or not on your PATH.
Developers need the JDK (which includes the compiler). Check it with:
Since Java 11 there is no separate JRE download from most vendors; you install a JDK, or a runtime image, and java is part of it.
If several versions exist, the first java on the PATH is the one that runs. Set JAVA_HOME to the one your tools need.
| Symptom | Fix |
|---|---|
java not recognized | Install a JDK and add its bin folder to PATH |
| Wrong version printed | Reorder PATH or change JAVA_HOME |
| App says it cannot find Java | Set JAVA_HOME to the JDK folder, not to its bin subfolder |
javac missing | You installed a runtime only; install the JDK |
| macOS cannot find Java | Install a JDK package or run brew install openjdk and follow the link instructions |
Good LTS choices are Java 21 or 25 from vendors such as Eclipse Temurin, Amazon Corretto, Microsoft Build of OpenJDK, Azul Zulu or Oracle.
Create Hello.java:
Run it directly, which compiles in memory:
The printed version depends on your installation.
Some programs ask whether Java is "enabled" because they embed a Java-based component, such as an old corporate web portal, a banking token tool or a network device console. Check these cases:
.jnlp replacement (OpenWebStart) instead of a browser.Android phones do not run Java through a system Java toggle either; apps are built with Kotlin or Java and shipped as packages, so there is nothing to enable.
Build tools and IDEs report their own Java. Run mvn -version or ./gradlew --version to see which JDK they use, and look at the project settings in your IDE if it differs from the terminal. In a Docker container, run docker run --rm eclipse-temurin:21 java -version to confirm a clean runtime without touching your system installation.
You cannot; the Java plugin is no longer supported. Use the application's installed launcher or a JavaScript-based alternative.
Not on current systems. Install a JDK yourself if an application requires one. Some apps bundle their own runtime.
It points tools such as Maven, Gradle and Tomcat to the JDK to use. It is not needed for running a simple java command.
Run java -version or apt list --installed 2>/dev/null | grep -i jdk on Debian-based systems.
Check Java with java -version, confirm the JDK with javac -version, and inspect PATH and JAVA_HOME if anything looks wrong. Browser settings for Java are obsolete because the plugin was removed.