Explore the Java Platform
Part 2
ResourcesIn this part we are going to define the resources used to develop and run a java application.
2. Java Runtime Environment (JRE)
The Java Runtime Environment, or JRE, is a
software bundle from
Sun Microsystems that allows a computer system to run a Java application. Java applications are in widespread use and necessary to view many Internet pages.
The software bundle consists of the Java Virtual Machine and the application and programming interface (API). The API provides a set of standard
class libraries. The virtual machine and API have to be consistent with each other and are therefore bundled together as the JRE. This can be considered a virtual computer in which the virtual machine is the processor and the API is the user interface. Sun also distributes a superset of the JRE called the Java 2
SDK (more commonly known as the JDK), which includes development tools such as the Java
compiler,
Javadoc, and
debugger.
2.1 Components of the JRE
2.1.1 Java Virtual machine (JVM)
A Java Virtual Machine (JVM) is a
virtual machine that interprets and executes
Java bytecode. This code is most often generated by
Java language compilers, although the JVM can also be targeted by compilers of other languages. JVM's may be developed by other companies as long as they adhere to the
JVM standard published by Sun.
The JVM is a crucial component of the Java Platform. The availability of JVMs on many types of hardware and software
platforms enables Java to function both as
middleware and a platform in its own right. Hence the expression "
Write once, run anywhere." The use of the same bytecode for all platforms allows Java to be described as "Compile once, run anywhere", as opposed to "Write once, compile anywhere", which describes cross-platform
compiled languages.
2.1.2 LibrariesJava
libraries are the compiled
byte codes of
source code developed by the JRE implementer to support application development in Java. Examples of these libraries are:
The core libraries, which include:
-Collection libraries which implement
data structures such as
lists,
dictionaries,
trees and
sets-
XML Parsing libraries
-Security
-
Internationalization and localization libraries
The integration libraries, which allow the application writer to communicate with external systems. These libraries include:-The
Java Database Connectivity (JDBC)
API for database access
-
Java Naming and Directory Interface (JNDI) for lookup and discovery
-
RMI and
CORBA for distributed application development
User Interface libraries, which include:-The (heavyweight, or
native)
Abstract Windowing Toolkit (AWT), which provides
GUI components, the means for laying out those components and the means for handling events from those components
-The (lightweight)
Swing libraries, which are built on AWT but provide (non-native) implementations of the AWT.
-APIs for audio capture, processing, and playback
There are more libraries than mentioned above, but the three categories mentioned above are the main categories.
2.1.3 PluginsPlugins enable a special kind of java applications called “Applets” to be run in Web Browsers. We will talk about applets in coming articles.
2.1.4 Java Web Start
Java Web Start is a framework developed by
Sun Microsystems which allows
application software for the Java Platform to be started directly from the Internet using a
web browser. Unlike Java applets, Web Start applications do not run inside the browser, and the
sandbox in which they run does not have to be as restricted, although this can be configured. One chief advantage of Web Start over applets is that they overcome many compatibility problems with browsers' Java Plugins and different JVM versions. On the other hand, Web Start programs cannot communicate with the browser as easily as applets. To assist migration, a Java Applet can also be used as a Java Web Start application.
2.1.5 Licensing and documentation2.2 APIsThe
classes in the Java APIs are organized into separate groups called
packages. Each package contains a set of related
interfaces, classes and
exceptions. Refer to the separate platforms for a description of the packages available.
Sun has defined three platforms targeting different application environments and segmented many of its
APIs so that they belong to one of the platforms.
The platforms are:
Java Platform, Micro Edition (Java ME) — targeting environments with limited resources like cellular phones.
Java Platform, Standard Edition (Java SE) — targeting workstation environments.
Java Platform, Enterprise Edition (Java EE) — targeting large distributed enterprise or Internet environments.
As mentioned before, java platform is very wide in terms of functionality; in addition, java is an open source platform which makes it possible for any one to edit and add more functionality, so, in order to utilize this feature, there is a standard process defined to allow interested parties to be involved in the definition of future versions and features of the Java platform. This process is called the Java Community Process (JCP).
The JCP involves the use of Java Specification Requests (JSR), which are formal documents that describe proposed specifications and technologies to be added to the Java platform. Formal public reviews of JSRs are conducted before the JSR becomes final and is voted on by the JCP Executive Committee. A final JSR provides a
reference implementation which provides a free implementation of the technology in source code form and a
Technology Compatibility Kit to verify the
API specification.
Extensions and related architecturesThe
extensions to standard Java are typically in javax.* packages. They are not included in the JDK or JRE. Extensions and architectures closely tied to the Java programming language include:
Java EE (previously J2EE) (Java Platform, Enterprise Edition—for distributed enterprise applications)
Java ME (previously J2ME) (Java Platform, Micro Edition—for PDAs and cellular phones)
JMF (Java Media Framework)
JNDI (Java Naming and Directory Interface)
JSML (Java Speech API Markup Language)
JDBC (Java DataBase Connectivity)
JDO (Java Data Objects)
JAI (Java Advanced Imaging)
JAIN (Java API for Integrated Networks)
JDMK (Java Dynamic Management Kit)
Jini (a network architecture for the construction of
federated distributed systems)
JiroJava Card (Java for
smart cards)
JavaSpacesJML (Java Modeling Language)
JMI (Java Metadata Interface)
JMX (Java Management Extensions)
JSP (JavaServer Pages)
JSF (JavaServer Faces)
JNI (Java Native Interface)
JXTA (Open Protocols for
Peer-to-Peer (P2P) Virtual Network)
Java 3D (A high level API for 3D graphics programming)
JOGL (Java OpenGL—A low level API for 3D graphics programming, using
OpenGL)
LWJGL (Light Weight Java Game Library—A low level API providing access to
OpenGL,
OpenAL and various input devices)
OSGi (Dynamic Service Management and Remote Maintenance)
2.3 Summary and coming articlesThis article can be considered the entry point for discussing the java platform in a more detailed view. We described the components of the JRE including the JVM and APIs.
Starting from the next article, we are going to discuss the main three platforms of java one by one showing the functionality of each platform.
.. more.