Using cmd command:
Open command prompt if you are using Windowds 7/8/10Open teminal if you are using MAC or Linux
Now type below command to check :
to check your JRE Version :
java -version
to check your java compiler version if you installed the JDK :
javac -version