Introduction to Java

Java as a programming language was originally developed by James Gosling and his team at Sun Microsystems and released in 1995 as a core component of Sun Microsystems’ Java platform.  The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode that can run on any Java Virtual Machine (JVM) regardless of computer architecture.

The original and reference implementation Java compilers, virtual machines, and class libraries were developed by Sun from 1995. As of May 2007, in compliance with the specifications of the Java Community Process (JCP), Sun made available most of their Java technologies as free software under the GNU General Public License. Others have also developed alternative implementations of these Sun technologies, such as the GNU Compiler for Java and GNU Classpath. Now-a-days Java technology is being owned by Oracle corporation.

The term Java actual refers to more than just a particular language like C or Pascal. Java encompasses several parts, including:

♦ A high level language: Java is a high level language that at a glance looks very similar to C and C++ but offers many unique features of its own.

♦ Java bytecode: a compiler, such as Oracle’s javac, transforms the Java language source code to bytecode that runs in the JVM.

♦ Java Virtual Machine (JVM): a program, such as Sun’s java, that runs on a given platform and takes the bytecode programs as input and interprets them just as if it were a physical processor executing machine code.

Oracle provides a set of programming tools such as javac, java and others in a bundle that it calls a Java Development Kit for each version of the language and for different platforms such as Windows, Linux, etc. Oracle also provides a runtime bundle with just the JVM when the programming tools are not needed.

 

Types of Java Applications

There are mainly four types of applications that can be created using Java programming language —

1) Stand-alone Application

Stand-alone applications are also known as desktop applications or window-based applications. These are traditional softwares that we need to install on every machine. Examples of standalone application are Media player, anti-virus, etc. AWT and Swing are used in Java for creating standalone applications.

2) Web Application

This is a type of application that runs on the server side and creates a dynamic page is called a web application. Currently, Servlet, JSP, Struts, Spring, Hibernate, JSF, etc. technologies are used for creating web applications in Java.

3) Enterprise Application

This is a type of application that is distributed in nature, such as banking applications, etc. is called enterprise application. It has advantages of the high-level security, load balancing, and clustering. In Java, EJB is used for creating enterprise applications.

4) Mobile Application

This is a type of application which is created for mobile devices is called a mobile application. Currently, Android and Java ME are used for creating mobile applications.

 

Java Platforms / Editions

There are four platforms or editions of Java —

1) Java SE (Java Standard Edition)

This is the Java programming platform. It includes Java programming APIs such as java.lang, java.io, java.net, java.util, java.sql, java.awt etc. It includes core topics like OOPs, String, Regex, Exception, Inner classes, Multithreading, I/O Stream, Networking, AWT, Swing, Reflection, Collection, etc.

2) Java EE (Java Enterprise Edition)

This is the enterprise platform which is mainly used to develop web and enterprise applications. It is built on the top of the Java SE platform. It includes topics like Servlet, JSP, Web Services, EJB, Java Persistence API (JPA), etc.

3) Java ME (Java Micro Edition)

This is the micro platform which is mainly used to develop mobile applications.

4) JavaFX

This is used to develop rich internet applications (RIA). It uses a light-weight user interface API.