Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Programming»JAVA»How to Check Java Version

    How to Check Java Version

    RahulBy RahulDecember 6, 20202 Mins Read

    Java is a cross-platform, object-oriented programming language developed by the Sun Microsystems in the year 1995. Today, java is used by the billion’s of devices, games, media players, audio vide applications etc.

    As of today Java SE 15 is the latest version available for the installation. JDK 16 will be the next version expected to release in March, 2021. Both are the short term releases supports till next release only. After that JDK 17 will the next Long-Term Support release, will be supported for approx. eight years.

    Java installation tutorials:

    • Install Java on Ubuntu 20.04
    • Install Java on Debian 10
    • Install Java on CentOS 8
    • Install Java on macOS

    This tutorial described you to how to check Java version installed on a system.

    Check Java Version

    Java comes in two types of installations. You can either install Java Development Kit (JDK) or install Java Runtime Environment (JRE) only.

    The JDK installation also includes the JRE. JDK is uses to compile java programs is basically installed on development systems. Where JRE is uses to run java programs compiled by the JDK. The JRE is required to install or production servers, where we only run the applications.

    • Check Java Runtime Version – You can use -version command line argument prints version details on error stream, also you can use --version prints java version details on standard output. Open a terminal (CTR+ALT+T) and type:
      java --version 
      
      java 11 2018-09-25
      Java(TM) SE Runtime Environment 18.9 (build 11+28)
      Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11+28, mixed mode)
      

      The above output shows that you have installed Java SE 11 on your system.

    • Check Java Compiler Version – javac is the compiler used to create bytecode from Java source code. Java compiler is installed with Java Development Kit (JDK). Use below command to view java compiler version.
      javac --version  
      
      javac 11
      

    Conclusion

    In this tutorial, you have learned about finding hte installed JDK or JRE versions on any system.

    Java jdk jre version
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow To Check Ubuntu Version
    Next Article How to View Current EST Time in Linux

    Related Posts

    How to Install JAVA on Ubuntu 22.04

    Updated:May 16, 20224 Mins Read

    Java HashMap – How to Get Value from Key

    Updated:April 6, 20222 Mins Read

    Java HashMap – How to Get Key from Value

    Updated:April 6, 20222 Mins Read

    5 Methods to Print an Array in Java

    Updated:April 21, 20222 Mins Read

    How To Install Java on Debian 11

    4 Mins Read

    How To Check OS Version with Linux Command Line

    3 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Enable / disable Firewall in Windows
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    • How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.