Regardless of whether one thinks that Java is now growing, or inactive, or dying, one has to admit that Java had truly revolutionised and had defined the programming language. Java had combined and brought to the tons of useful programming language features that were previously available only separately or in various languages. Java is a programming language and platform released by Sun Microsystems in 1995. Java is secure, fast, and reliable programming language. Java is everywhere from PCs to Mobile phone, satellites, other electronic devices. There are many applications and websites that will not run without Java installation on your machine.
Learn Java in 16 hrs from experts
Java is a programming language which produces software that can be used for gaming, web, business, desktop, database, and other applications. It exhibits most of its syntax from C/C++.
Java is simple, fast, object-oriented, robust, secure, multi-threaded, and platform independent programming language. Java platform consists of several programs, each of which provides a portion of its overall capabilities.
Basically, Java consists of two portions-
Code consists of source code and byte code. Source Code is what a programmer writes in the text editor, then Java Compiler compiles that and produces byte code.
Java platform includes an execution engine, a compiler, and a set of libraries that help to develop programs.
Java was designed by Sun Microsystems in the early 1990s to solve the problem of connecting many household machines together. In 1991 java was started initially it was called as “Oak”. Later Java became popular for developing web internet applications. Java was developed by James Gosling and a small team of engineers. James Gosling is considered as “FATHER OF JAVA”. The main concept of java is “Write Once, Run Anywhere”. Java first publication 1.0 was released in 1995 by Sun Microsystems. Now, Sun Microsystem is the part of Oracle Corp.
Wish to Learn JAVA? Click Here
Java provides very good features which are better as compared to C/C++. These features are:
As you know the features of Java, let’s move into the steps to install Java.
On Windows: Use the following command:-
Right click on My Computer ->Properties ->Advanced System setting ->Environment Variable ->new button in the user variable
Provide the required info:
For Example:
If it contains ‘C:\Windows\System32′ then change your path by ‘C:\Windows\System32; C:\Program Files\java\bin’.
Click OK button
On Linux, UNIX, Solaris
Use the following command:
export PATH=$PATH:/home/jdk1.6.01/bin/
Where JDK is installed in the home directory under Root (home)
Say you have saved a program in D drive, then
D:\set PATH=%PATH%; C:\jdk1.8.0\bin;
After Java installation, write the below hello program in any text editor, save your program with the same name as that of the class, compile and execute.
class Hello{public static void main(String args[]){
/* multi-line comment */
System.out.println(“Hello Intellipaat”); //single line comment
}
}
Output:Hello Intellipaat
The above program contains the following main parts which are important before going into the main topics:
In the previous topic, you learned about the basic java program. But the question is what is helping Java to compile and execute this code?
There is something in java that helps in the compilation and execution of a program.
Let’s start with source code and byte code. The program which you write in the text editor is called as source code. The source code is saved with .java extension. The written code is converted by the java compiler into byte code with extension .class. This byte code can be run into any system that contains Java software. After that, java machine interprets the code and executes the program.
This is just like human digestive system.
The food you eat is the source code. Mouth acts as the compiler and converts the food by chewing into the byte code so that the food can pass through the throat.
Stomach stores the food and digests it which can be considered as interpret and execute.
Important Points:
See the picture to have a better understanding of JVM, JRE, JDK
JDK = JRE + Development tools
JRE= JVM + Library classes
NextLearn SQL in 16 hrs from experts
"0 Responses on Java Introduction and Installation"