Java has advanced through the years in both functionality and reach. Current editions are on the Java 2 Platform. The Java 2 Platform has various incarnations as well, including Java 2 Platform.
The Java 2 Platform has three basic Editions-
1. Java 2 Standard Edition (J2SE): J2SE is used primarily for writing applets and other Java-based applications.
2. Java 2 Enterprise Edition (J2EE): J2EE is the Java architecture for developing multitier enterprise applications. As part of J2EE, JSP pages have access to all J2EE components, including JavaBeans and Enterprise JavaBeans components and Java servlets. JSP pages are actually compiled into servlets, so they have all of the benefits of these flexible, server-side Java applications.
3. Java 2 Micro Edition (J2ME): J2ME is a technology that allows programmers to use the java programming language and related tools to develop programs for mobile wireless information devices such as cellular phones and personal digital assistants (PDAs).
Where it is used?
According to Sun, 3 billion devices run java. There are many devices where java is currently used. Some of them are as follows:
Java Application Types-
There are different types of Java applications before moving on to Servlets.
Java can be used to develop different types of applications:
Standalone Applications-
A standalone application is a program that runs on your computer. It is more or less like a C or C++ program.
Applets-
An applet is an application designed to travel over the Internet and to be executed on the client machine by a Java-Compatible web browser like Internet Explorer or Netscape. Applets are also Java programs but they reside on the servers. An applet can not be executed like standalone application. Applet can be executed only by embedding it into an HTML page like an image or sound file. To run an applet you need to access an HTML page which has applet embedded into it. When the web browser downloads such an HTML page, it subsequently loads the executable file, which contains Applet and then executes it on the local machine.
Web Applications-
Web applications run on the Web Server. Web applications are accessed through web clients i.e. web browsers like Internet Explorer or Netscape. Whenever you access some web site by specifying the URL (Universal Resource Locator), you are accessing some web application. The main components of a web application written in Java are:
Java Servlets
Java Server Pages (JSP), and
HTML
Java Servlets are also Java programs, which run on the Server and then send the result/response to the client. JSP pages can be thought of as a combination of HTML and Java Code. The Web Server converts JSP pages into Java Servlets before execution.
You access the web application by specifying the URL. If the URL corresponds to an HTML page the web server simply returns the HTML page to the client, which then displays it. If the URL corresponds to the Servlet or JSP then it is executed on the Server and the result/response is returned to the client, which is then displayed by the client.
Distributed Applications-
Java application can be divided into a number of modules/components (Java programs), which can run on different machines. The Java programs/applications running on different machines can communicate with each other. To be more precise the Java Objects on one machine can invoke methods on the Java Objects running on another machine. Thus Java has the support for the distributed processing in the language itself.
Strategy Design Patterns We can easily create a strategy design pattern using lambda. To implement…
Decorator Pattern A decorator pattern allows a user to add new functionality to an existing…
Delegating pattern In software engineering, the delegation pattern is an object-oriented design pattern that allows…
Technology has emerged a lot in the last decade, and now we have artificial intelligence;…
Managing a database is becoming increasingly complex now due to the vast amount of data…
Overview In this article, we will explore Spring Scheduler how we could use it by…