INTRODUCTION TO JAVA
In this post you will know some basic information about JAVA and how to install Ecllipse which is a Java Development Environment [JDE] which is used to execute programs written in java
First lets see Introduction to JAVA
James Gosling created Java at Sun Microsystems (which has since been acquired by Oracle) and it was first released in 1995 as a core component of Sun Microsystems' Java platform.
Java is a class-based, object-oriented programming language with a focus on minimising implementation dependencies. It is a compiled general purpose programming language designed for developers to write once and execute anywhere. All platforms that support Java can run Java code. Java programs are compiled into byte code that may be run on any Java Virtual Machine. Java's syntax is comparable with that of C/C++ languages
Java Terminologies
1. Java Virtual Machine (JVM) : The JVM stands for Java Virtual Machine.
A program's execution is divided into three stages. They are
i]write the program.
ii]compile it
iii]and run it.
A java programmer, like you and me, creates a program.The JAVAC compiler, which is a primary Java compiler provided in the Java development kit (JDK), is used to compile the code . It accepts a Java application as input and outputs bytecode.The JVM runs the bytecode generated by the compiler during the program's Running phase.
2. Bytecode : As previously stated, the JDK's Javac compiler converts Java source code to bytecode, which may then be executed by the Java Virtual Machine [JVM]. The compiler saves it as a .class file. A disassembler such as javap can be used to inspect the bytecode.
3. Java Development Kit (JDK): When we learn about bytecode and JVM, we used the name JDK. As the name implies, it is a complete Java development kit that includes everything from the compiler to the Java Runtime Environment (JRE), debuggers, and documentation. In order to design, compile, and run the java application, we must first install JDK on our computer.
4. JRE (Java Runtime Environment): JDK comes with JRE. The JRE installation on our PCs allows us to run the Java programme, but we are unable to build it. A browser, JVM, applet support, and plugins are all included in JRE. JRE is required for a computer to run a Java programme.
Main Features of JAVA
1.Java is a platform Independent programming language :
In Java Javac is a compiler that converts source code (.java files) to byte code (.class file). JVM, as previously said, executes the bytecode generated by the compiler. This byte code works on any platform, including Windows, Linux, and Mac OS. This means that a Windows-compiled programme can run on Linux and vice versa. Each operating system has its own JVM, yet the output they provide after bytecode execution is the same on all of them. That is why java is said to as a platform-independent language.
2.Java is an Object-Oriented Programming Language :
Object-oriented programming (OOP) is a method of arranging programmes as a collection of objects, each of which represents an individual instruction.
3.Portable :
As previously stated, java code developed on one system can be run on another. Hence java code is portable because platform independent byte code can be carried and executed on any platform.
4.Java is robust programming language :
The term "robust" means the ability to rely on something. The Java programming language was created with an emphasis on early error detection, which is why the java compiler can discover faults that are difficult to detect in other programming languages. Garbage collection, exception handling, and memory allocation are the core aspects of java that make it robust.
5.Java is Simple : Because it lacks sophisticated features such as pointers, operator overloading, multiple inheritances, and explicit memory allocation, Java is one of the simplest languages.
6.Java is Distributed : The java programming language allows us to develop distributed applications. Java distributed applications are built using Remote Method Invocation and Enterprise Java Beans. The java programmes can be readily deployed over one or more systems that are linked together via the internet.
7. High Performance : The Java architecture is designed to reduce overhead during runtime, and at times, java uses a Just In Time (JIT) compiler, which builds code only when it is called, allowing applications to run faster.
8. Dynamic flexibility : Because Java is totally object-oriented, we may add classes, new methods to existing classes, and even create new classes using sub-classes. Java also allows native methods, which are functions written in other languages such as C and C++.
9. Multithreading : Multithreading is supported by Java. It is a Java feature that permits the execution of two or more portions of a programme at the same time to maximise CPU utilisation.
Second lets see how to install Eclipse JAVA
There are 5 simple steps to follow as shown below
1. Download the Eclipse Installer
Download Eclipse Installer from http://www.eclipse.org/downloads
2. Start the Eclipse Installer executable
For Windows users, after the Eclipse Installer executable has finished downloading it should be available in your download directory. Start the Eclipse Installer executable. You may get a security warning to run this file. If the Eclipse Foundation is the Publisher, you are good to select Run.
For Mac and Linux users, you will still need to unzip the download to create the Installer. Start the Installer once it is available,the steps are same as below
3. Select the package to install
The new Eclipse Installer shows the packages available to Eclipse users. You can search for the package you want to install or scroll through the list.
Select and click on the package you want to install.
4. Select your installation folder
Specify the folder where you want Eclipse to be installed. The default folder will be in your User directory.Select the ‘Install’ button to begin the installation.
5. Launch Eclipse
Once the installation is complete you can now launch Eclipse. The Eclipse Installer has done it's work. Happy coding.
Comments
Post a Comment