Overview of Java
General Information
What is Java?
Java is a programming language, but
there are several aspects to it.
Java refers to the virtual machine that executes Java programs.
Java refers to the environment in which source programs are developed
and the tools that assist in development.
Java also refers to the libraries of already developed code.
Sun has bundled the libraries into three separate "editions"
aimed at different audiences.
Small: J2ME
The Java 2 Micro Edition (J2ME) provides the basic Java runtime
environment intended for embedding in cell phones, palmtops, or
other consumer products.
Medium: J2SE
The Java 2 Standard Edition (J2SE) is the one that most people would use.
In addition to the runtime system you have deveopment tools like a compiler and debugger.
With it you can write and run Java applications and applets.
Large: J2EE
The Java 2 Enterprice Edition (J2EE) contains everything in the
standard edition and more.
It contains support for enterprise directories, transaction management,
and messaging.
Releases of Java
See the Sun Developer Network Site timeline
and Java version history.
Also
J2SE Code Names.
Also
Java SE Language Features [pdf] by Inyoung Cho.
Version | Date | Features |
JDK 1.0.2 | Jan 1996 | I/O, networking, applets |
JDK 1.1 | Feb 1997 | Inner classes, new event handling model, RMI, JDBC, serialization |
JDK 1.2 (Playground) | Dec 1998 | Floating point changes, "Swing" GUI library, collections, reference objects |
now called Java 2 Platform |
Java 2, SE 1.3 (Kestrel) | May 2000 | CORBA compatibility, Java sound |
Java 2, SE 1.4 (Merlin) | Dec 2001 | Assertion statement, pattern matching, Webstart support |
Java 2, SE 1.5 (Tiger) | Feb 2005 | Generics, enhanced for loop |
Java 2, 1.5.0_09 | Oct 2006 | |
Java SE 6 (Mustang) | Dec 2006 |
Java SE 7 (Dolphin) |
Key features of the Java programming language
Language, extensive libraries, tools.
Not just main applications but little programs
subservient to browsers (applets), servers (servlet).
- ALGOL-like: imperative, strongly-typed, block structured, recursive
- C++ like syntax, expressions
- objects, interfaces
- packages: groups of classes organized in directories
- lightweight threads of control
- garbage collection
- exceptions
Comparison with C++
Syntactically very similar to C/C++.
Bears a deaper resembleness to Ada and Modula-3.
With respect to C++, there are some important differences:
- representation of primitives is fixed, not implementation dependent
- import not like include
- no goto, but multi-level break and continue
- everything must be in some class
- errors not warnings, eg uninitialized variables
- catch or declare exceptions
- no multiple inheritance, but interfaces
- virtual (dynamic dispatch) is default
- no destructors
- garbage collection
- no operator overloading, no RTI, no namespaces
Brief Glimpse at Libraries
Library | Purpose | Example Classes |
| Basic runtime support such as strings, threads, reflection, and exceptions
|
,
,
,
,
,
|
| files and input/output
|
,
,
|
| applets
|
|
| Support for color, fonts, and graphic display
|
,
,
|
| data structures
|
,
,
,
|
| networking classes
|
,
|
Library | Purpose |
| GUI components with improved appearance
|
,
,
,
|
| Support for the visually impaired
|
|
|
JDK tool suite
- javac The compiler for the Java programming language.
- java The launcher for Java applications.
- jar
- javadoc
- appletviewer
- jdb
- javah
C header and stub generator. Used to write native methods.
- javap
Class file disassembler
- extcheck Utility to detect Jar conflicts.
- native2ascii Convert text to Unicode Latin-1.
- keytool Manage keystores and certificates.
- jarsigner Generate and verify JAR signatures.
- policytool GUI tool for managing policy files.
RMI tools
- rmic Generate stubs and skeletons for remote objects.
- rmiregistry Remote object registry service.
- rmid RMI activation system daemon.
- serialver Return class serialVersionUID.
Sun Microsystems develops and controls Java.
But others have tools, development environments etc., for example,
IBM
Jikes
compiler for Java.
And GNU gcj
Tip: (From van der Linden.) A quick look at a Java API can be had by running javap.
For example,
% javap java.util.Random
public class java.util.Random extends java.lang.Object implements java.io.Serializable {
static final long serialVersionUID;
public java.util.Random();
public java.util.Random(long);
protected synchronized int next(int);
public boolean nextBoolean();
public void nextBytes(byte[]);
public double nextDouble();
public float nextFloat();
public synchronized double nextGaussian();
public int nextInt();
public int nextInt(int);
public long nextLong();
public synchronized void setSeed(long);
}
Ryan Stansifer <ryan@cs.fit.edu>
Last modified: Thu Jan 25 13:23:57 EST 2007