In this tutorial, we will go through the introduction of Java Programming Language, Java Development Kit(JDK) and Java Runtime Environment. Java is the most popular Language among Programmers and Developers due to its huge potential and applicability in Designing Real Time Applications. It was originally designed by Sun Microsystems which has now been developed and managed by Oracle. More on Java Official Documentation.
Application of Java Programming Language
- Java is Known to be used in Mobile Application Development.
- All Android apps are usually written on Java Programming Language.
- Due to the usage of Java Byte Code concept, it is compatible with most of the Hardware Platforms.
- It is frequently used as Artificial Intelligence and Machine Learning Programming Language.
- With its rich API Library it is compatible with other programming languages and hence it can easily be Integrated with Other technologies as well.
- Huge applicability on Internet on Things(IoT).
- Java based applications are also used in Scientific and Research Purposes.
- Extensive use in e-commerce applications.
- Java based applications are used in wide range of sectors like Pharma, Healthcare, Automobile, Space, Transport etc.
Introduction to Java Programming – Java Development Kit(JDK) and Java Runtime Environment(JRE)
Why to Use Java over Other Programming Languages
Java is considered to be the most efficient language for creating highly secure Desktop and Mobile Applications. It also provides high level of Concurrency w.r.t other Object Oriented programming languages like C++. It is very easy to use where one has to only familiar with Java Development Kit and $PATH to start with the setup. Java based applications can be easily ported to another hardware architecture with utmost flexibility.
What is JVM(Java Virtual Machine)
Java Virtual Machine(JVM) is the virtual machine that runs the Java bytecodes. The JVM does not understand Java source code which is why you need to compile your Java source code files to obtain *.class files that contain the bytecodes understood by the JVM. The same bytecodes give the same results makes Java a Platform Independent Language.
You could create your own JVM but usually we use the reference JVM given by Oracle(formerly Sun Microsystem). So Basically you need to have the compilation done before JVM understand the language. Here the role of Java compiler is to take your source code and after compilation create a .class file which is nothing but the Byte code. This byte code is now interpreted by JVM which finally runs this code on any platform.
What makes Java Platform Independent ?
You just have to compile a Program in one machine and create byte code. To run that byte code you only need to have JVM available on a particular machine. Here it is worth mentioning that JVM would be different on all the different machine. For e.g: if you need JVM for Windows then you need to download JVM for window and if you need JVM for Linux then you need to download JVM for Linux. Once you have the JVM installed in your machine now it should be able to detect the JVM code.
What is JRE(Java Runtime Environment)
Java Runtime Environment(JRE) is a package that contains libraries, JVM and other important components required to run Applets and applications written in Java Programming Language. For any Java application to run on your machine, you need to have JRE installed otherwise it won’t run.
What is JDK(Java Development Kit)
Java Development Kit is a package which contains JRE, Java Compiler and other important tools like debuggers which are necessary for Application development and debugging. So to further clarify between JRE and JDK, we usually install JRE when we want to run some Java application on our machine and we usually install JDK when we want to develop and run any Java Based Application.
Popular Java Libraries
There are many Java libraries available till date but the most popular ones are mentioned below.
- Java FX