Java was born and took its first steps in 1991 as part of a project to develop software support for consumer electronics i.e. refrigerators, washing machines, carried out by a SUN team called Green Team. This first approach gave Java one of its most interesting features, the portability, since Java programming language had to work on many types of CPUs, and therefore was thought to be independent of the platform on which it could work. This feature is quite possibly the one that has allowed Java programming language to become currently the language par excellence for the creation of applications on Internet.
This jump from Java to become a programming language for computers was given in 1995 when in version 2 of the Netscape web browser included an interpreter for this language, thus, producing a real revolution on the internet.
With this new approach, Java programming language continued to grow and released version 1.1 in 1997 with many improvements and adaptations with the result of a substantial revision of the language. Java 1.2 appeared at the end of 1998 and later it was renamed as Java 2.
What is JAVA 2?
Java 2 is the third major version of the Java programming language, part of version 1.1 without introducing substantial changes, simply by extending it. Java presents many characteristics that differentiate it from similar languages like C++, starting with the possibilities of execution. Basically a Java program can be run as;
- Stand Alone, an independent application
- Applet, a special application that runs on the client’s browser
- Servlet, a special application with no interface running on the server
On the other hand, development in Java programming language never starts from scratch. It implements a large number of classes, including free of charge in its development environment, to perform a variety of tasks that allow the developer to focus on the characteristics inherent to his/her project.
Sun offers Java development environment called JDK, SDK or J2SE from its website free of charge. This package includes the classes already included in Java i.e. Java API. It also includes the Java compiler which allows Java to work on our computers, Java Runtime Environment (JRE).
JRE includes necessary elements to run Java programs on our computers. Mainly we install Java Virtual Machine and necessary plugins for the browser or they are pre-installed in our system. JRE can also be downloaded independently of the development environment, as it is distributed in a package called J2RE.
Java Virtual Machine is independent of the architecture on which it works and the way Java programming language has to get it is through the emulation of a software machine on which the programs is compiled with Java.
A program compiled with Java programming language does not have code comprehensible by any processor, but that code is only understood by Java Virtual Machine which translates the code to the processor on which it works and also it can make it work on the operating system on which it is installed. Therefore, the only thing dependent on the hardware is the virtual machine, because you have to know what you have to carry out for the translation, but the programs in Java programming language can always work on a virtual machine wherever it is installed.
JavaServer Pages (JSP)
It lets the developers to dynamically create HTML, XML or other kinds of documents as a response to the request from any web client. It also allows the creation of libraries of JSP tags that act as extensions to HTML tags and XML standards. JSPs are compiled as Java Servlets using a JSP compiler.
It is a program compiler that parses JSP pages, transforming them into executable Java Servlets.
A java servlet is a program that runs on a server. Usually Java applications are running in an environment of web server.
It is a small program based on internet and written in Java. Applets are usually embedded in web pages and can run directly from a browser with Java support. For a Java applet to be executed, the browser must have a Java Virtual Machine.
Java applets are the form of web application, which can be virtually the same as with traditional application. For example, a Java applet may be incorporated as web animation to a website.
Java Virtual Machine (JVM)
Application that interprets and executes programs written in Java programming language specifically, can interpret the bytecode generated in Java compiler.
What makes JVM is to finish compiling the bytecode in machine language, so that Java application can be executed on a specific device. Multiple websites and applications are programmed in Java and a Java virtual machine must be used to run, therefore, a computer or electronic device must have it installed to run.