What Is Java?
Java is a general-purpose, concurrent, object-oriented, class-based, and the runtime environment(JRE) which consists of JVM which is the cornerstone of the Java platform.
Before elaborating on Java's functionality, admin will give a brief description of what JVM is about.
What JVM Stands For?
Virtual Machine (JVM) is an engine that provides a runtime environment to drive Java code or applications. It converts Java bytecode into machine language.
Technical Definition: The JVM is the specification for a software program that executes code and provides the runtime environment for that code.
Everyday Definition: The JVM is how we run our Java programs. We configure the JVM's settings and then rely on it to manage program resources during execution.
What Is Java Used for?
- Banking: To deal with transaction management
- Retail: Billing applications that you see in a store/restaurant are completely written in Java
- Information Technology: Java is designed to solve implementation dependencies
- Android: Applications are either written in Java or use Java API
- Financial Service: It is used in server-side applications
- Stock Market: To write algorithms as to which company they should invest in .
- Scientific and Research Community: To deal with huge amount of data
Wait! Java can do more.
Previous image shows you how some of the technologies make use of Java as an essential core of their functionalities.
History of Java
Java is a programming language developed by James Gosling with other team members named Mike Sheridan and Patrick Naughton also called as Green Team in 1995 for Sun Microsystems for digital devices such as set-top boxes, televisions etc.
Components In Java
1. JVM ( Java Virtual Machine)
It is an abstract machine. It is a specification that provides a run-time environment in which Java bytecode can be executed.
2. JRE (Java Runtime Environment)
JRE refers to a runtime environment in which Java bytecode can be executed. It implements the JVM (Java Virtual Machine) and provides all the class libraries and other support files that JVM uses at runtime.
3. JDK (Java Development Kit)
The JDK completely includes JRE which contains tools for Java programmers. The Java Development Kit is provided free of charge. Along with JRE, it includes an interpreter/loader, a compiler (javac), an archiver (jar), a documentation generator (Javadoc) and other tools needed in Java development. In short, it contains JRE + development tools.
4. Garbage Collection
The JVM automatically re-collects the memory which is not referred to by other objects. The Java garbage collector checks all object references and finds the objects which can be automatically released.
While the garbage collector relieves the programmer from the need to explicitly manage memory, the programmer still need to ensure that he does not keep unneeded object references.
Otherwise, the garbage collector cannot release the associated memory. Keeping unneeded object references are typically called memory leaks.
The classpath defines where the Java compiler and Java runtime look for
.class files to load. These instructions can be used in the Java program.
For example, if you want to use an external Java library you have to add this library to your classpath to use it in your program.
8 Interesting Facts About Java
- Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.)
- It is one of the most popular programming language in the world.
- It is easy to learn and simple to use.
- It is open-source and free.
- It is secure, fast and powerful.
- It has a huge community support (tens of millions of developers).
- Java is an object oriented language which gives a clear structure to programs and allows code to be reused, lowering development costs.
- As Java is close to C++ and C#, it makes it easy for programmers to switch to Java or vice versa.
Installation Of Java
If you want to install Java, it is highly recommended for you to get it from Java website to ensure that the files are secure and exactly what you want.
Here's what you need to know before installing Java:
1. Check Installation
To run Java programs, you seharusnya must have the Java runtime environment (JRE) installed . Besides, the Java executables must be available in your path environment too.
2. Install Java
For Microsofts Windows, Oracle provides a native installer which can be found on the Java website. It contains instructions on how to install Java for all supported platforms.
3. Installation Problems And Other Operating Systems
If you have problems installing Java on your system, search via Google for How to install JDK on YOUR OS.
Of course, replace
YOUR OS with your operating system, e.g., Windows, Ubuntu, Mac OS X, etc. This should result in helpful links.