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.
JSP Compiler
It is a program compiler that parses JSP pages, transforming them into executable Java Servlets.
JavaScript
It is interpreted programming language and does not require compilation. It is used especially in web pages embedded in the HTML code or the like. Most browsers can interpret JavaScript code embedded in web pages. JavaScript is a language based on prototypes, since the new classes are generated by cloning the base classes (prototypes) and extending their functionalities.
It was created by Brendan Eich at Netscape, first appearing in the Netscape Navigator 2.0 browser. Initially Mocha, then it was finally called JavaScript in a joint announcement between Sun Microsystems (creators of Java) and Netscape on 4 December 1995.
By existence of different incompatible versions of JavaScript, the World Wide Web Consortium (W3C) designed a standard called DOM (Document Object Model). With JavaScript you can extend the possibilities of web pages such as avoiding that you can copy the text of a page, buttons to automatically add a page to favorites, create scroll bars, open popups, change the mouse pointer, rotate banners and validate forms.
Java Servlet
A java servlet is a program that runs on a server. Usually Java applications are running in an environment of web server.
Java Applet
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.