The best and the easiest way to check if Java is being installed on your system is by using the Command Prompt on Windows or Terminal if you're on Mac OS X or any other Linux/Unix flavor.
macOS / Linux / Unix :Open Terminal and type the following command :
$ java -version
If java is being installed on the system you will get a response with the version details,
$ java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
$

Open Command Prompt and type the following command,
c:\> java -version
If it is installed you should get the ver details as the response of the command,
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode, sharing)
The other ways to check if Java is installed :
For Windows XP- Click on Start.
- Now Select Control Panel
- Under Control Panel → Add/Remove Programs
- Check in Add/Remove control panel list of softwares installed contains Java with version.


- Click on Start
- Now Select Control Panel
- Now Click on Programs and Features
- Check if there is Java version included.
- Goto Control Panel
- Under Control Panel select Programs
- Now Click Programs and Features
- Check if installed Java version is listed.
- Goto System Preferences (you can do a spotlight search to get there)
- Check if you can see Java Icon
- Click on the Java icon
- Click on About button to get the version details
- Create a Zip file using Java Code programmatically
- Eclipse : A java Runtime Environment (JRE) or Java Development kit (JDK) must be available
- How to Sort a LinkedList in Java
- Loading class com.mysql.jdbc.Driver. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver
- How to declare and initialize Array in Java Programming
- [Fix] java: integer number too large compilation error
- Java JDBC Connection with MySQL Driver in VS Code + Troubleshooting
- Reading .xls and .xlsx Excel file using Apache POI Java Library
- IntelliJ: Error: Could not find or load main class, java.lang.ClassNotFoundException
- How to get Client IP address using Java Code Example
- Truncate table using Java JDBC Example
- Struts 2 : There is no Action mapped for namespace [/] and action name [form] associated with context path [/proj]
- How to get file path in Idea IntelliJ IDE
- Java Generics explained with simple definition and examples
- Java SE 8 Update 301 available with various bug fixes and security improvements
- Java: Collect Stream as ArrayList or LinkedList
- Java JDBC Connection with PostgreSQL Driver Example
- How to check if Java main thread is alive
- How to fix Java nio NoSuchFileException wile reading a file
- Java 8+ get Day of the Week Examples with LocalDateTime, DateTime, ZonalDateTime and Instant classes
- Ways to Convert Integer or int to Long in Java
- [Java] How to throws Exception using Functional Interface and Lambda code
- [Fix] Spring Boot: mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
- Java: The value of the local variable string is not used
- Java JDBC: Insert Java 8 LocalDate and Time using PreparedStatement
- Microsoft Teams Zoom In and Zoom Out Keyboard Shortcut - Teams
- Calculate days between dates using dateutils ddiff command - Linux
- How to Uninstall Android Studio on Mac - Android-Studio
- How to fix Microsoft Windows 10 update error 80070020 - Microsoft
- The tag img may only appear as a descendant of tag noscript. Did you mean amp-img - AMP
- Make Bootstrap Button look like a link - Bootstrap
- Install specific JRE on Ubuntu using apt - Ubuntu
- 18: Get Sub List By Slicing a Python List - 1000+ Python Programs - Python-Programs