Yes, Java is very useful on a computer, but not in the way it used to be. Today it is mainly a platform for server software, Android development, desktop tools, build systems and data infrastructure. As a regular user you only need Java installed if an application you run requires it.
Java programs run on the Java Virtual Machine (JVM), so the same compiled code works on Windows, macOS and Linux. That portability is why Java is used so widely.
Java runs software in several areas:
| Area | Examples |
|---|---|
| Desktop applications | IntelliJ IDEA, Android Studio, DBeaver, many internal business tools |
| Development tools | Gradle and Maven build tools, Apache JMeter, the Jenkins automation server |
| Games | Minecraft: Java Edition, plus engines like libGDX |
| Server and enterprise software | Spring Boot applications, banking and e-commerce backends |
| Data and messaging | Apache Kafka, Spark, Elasticsearch |
| Mobile | Android apps (Kotlin is preferred for new code, Java is supported) |
Some of these bundle their own Java runtime, so you may use them without ever installing Java yourself.
Most people do not. Web browsers no longer run Java: the applet plugin was removed from browsers years ago. Many Java desktop programs include a private runtime in their installer.
You need a JDK (Java Development Kit) installed if you want to write, compile or run Java code yourself, or you use an application that explicitly asks for a system Java. A JRE alone is rarely distributed separately now, because current Java distributions ship the JDK.
Check whether Java is installed:
If java is not found, install a free OpenJDK build such as Eclipse Temurin, Amazon Corretto or Microsoft Build of OpenJDK, using a Long-Term Support release such as Java 21 or Java 25.
Since Java 11 you can run a single source file directly, and Java 25 makes tiny programs even shorter. This classic version works on every modern JDK:
Save it as Hello.java, then run:
The java launcher compiles the file in memory and runs it, so you do not need a separate javac step. For larger projects use Maven or Gradle to compile, test and package your code into a JAR file.
Several reasons keep Java in use:
For desktop interfaces Java offers Swing (included in the JDK) and JavaFX (a separate open-source library). Neither is as common for new consumer desktop apps as web technologies, but they are still used for tools and internal applications.
If you are deciding whether to spend time on Java, think about what you want to build. Java suits backend services, Android work and large applications that must be maintained for years. Python is quicker for scripts and data analysis, and JavaScript is required for browser interfaces. Because Java is strongly typed and has excellent tooling, many beginners find that it teaches habits such as reading compiler errors, structuring code into classes and writing tests, and these carry over to other languages. A good setup is a current JDK, an editor or IDE such as IntelliJ IDEA, Eclipse or VS Code with the Java extension, and a build tool like Maven or Gradle.
If you install Java, keep it updated, because each quarterly update includes security fixes. Install only what you need, remove old versions, and download from your vendor or package manager. A current Java on your computer is not a risk by itself, but outdated runtimes with known vulnerabilities are.
No. Browsers do not run Java any more, and websites no longer use Java applets.
The JRE runs Java programs. The JDK includes the JRE plus the compiler and tools for developing. Current distributions ship the JDK.
Yes. OpenJDK distributions such as Temurin and Corretto are free, including for commercial use.
Yes. The JVM is available for all three, and the same compiled program runs on each.
Java is useful on a computer for running and building server software, Android apps, development tools, games like Minecraft and desktop applications. You only need to install it when you develop with Java or run software that requires it. Choose a free OpenJDK build on an LTS release, keep it updated, and use java -version to check what is installed.