Java (Sun)
Encyclopedia : J : JA : JAV : Java (Sun)
Java refers to a number of computer software products and specifications from Sun Microsystems (the Java™ technology) that together provide a system for developing and deploying cross-platform applications. Java is used in a wide variety of computing platforms spanning from embedded devices and cell phones on the low end to enterprise servers and super computers on the high end. Java is fairly ubiquitous in cell phones, Web servers and enterprise applications, and somewhat less common in desktop applications, though users may have come across Java applets when browsing the web.
For years, Sun Microsystems referred to Java as the "Java technology" but has used the word "Java" as an adjective about the technology. In practice, many programmers have used the word "Java" to mean the programming language, while the execution platform was called the "JRE" (Java Runtime Environment) and the compiler-system was called the "JDK" (Java Development Kit), rather than a "Java compiler" as such. The word "Java" has often been used as an adjective, but the formal term "Java technology" should be noted (see history below).
Major products and technologies
Programming language
Writing in the Java programming language is the standard way to produce code that will be deployed as Java bytecode (though there are compilers available for other languages such as Python and Ruby). Java syntax borrows heavily from C and C++ but it eliminates certain low-level constructs such as pointers and has a very simple memory model where every object is allocated on the heap and all variables of object types are references.
Java has non-object primitive types but everything else is an object. The standard Java libraries provide wrapper objects for the primitive types, and since Java SE 5.0 the Java compiler automatically inserts conversions between a wrapper type and its corresponding primitive. Memory management is handled through integrated automatic garbage collection performed by the Java Virtual Machine.
Platform
The Java platform consists of a Java virtual machine and implementations of the standard libraries. In order to allow for different types of system there are now three versions. Sun refers to their implementation of the Java platform as the Java Runtime Environment (JRE).
- Java ME (Micro Edition): Specifies several different sets of libraries (known as profiles) for devices which are sufficiently limited that supplying the full set of Java libraries would take up unacceptably large amounts of storage.
- Java SE (Standard Edition): For general purpose use on desktop PCs, servers and similar devices.
- Java EE (Enterprise Edition): Java SE plus various APIs useful for multi-tier client-server enterprise applications.
Java Development Kit
The Java Development Kit (JDK) is a Sun product aimed at Java developers. Since the introduction of Java, it has been by far the most widely used Java SDK. It contains a Java compiler and a number of other important development tools as well as a full copy of the Java Runtime Environment.
History
Early history
The Java platform and language began as an internal project at Sun Microsystems in December of 1990, providing an alternative to the C++/C programming languages, with the new Green Operating System (OS) and a related language internally called Oak in 1992, later renamed to Java in 1994, since Oak was already trademarked.
Back in 1990, Engineer Patrick Naughton had become increasingly frustrated with the state of Sun's C++ and C APIs (application programming interfaces) and tools. While considering moving to NeXT, Naughton was offered a chance to work on new technology and thus the Stealth Project was started.
The Stealth Project was soon renamed to the Green Project with James Gosling and Mike Sheridan joining Naughton. Together with other engineers, they began work in a small office on Sand Hill Road in Menlo Park, California. They were attempting to develop a new technology for programming next generation smart appliances, which Sun expected to be a major new opportunity.
The team originally considered using C++, but it was rejected for several reasons. Because they were developing an embedded system with limited resources, they decided that C++ demanded too large a footprint and that its complexity led to developer errors. The language's lack of garbage collection meant that programmers had to manually manage system memory, a challenging and error-prone task. The team was also troubled by the language's lack of portable facilities for security, distributed programming, and threading. Finally, they wanted a platform that could be easily ported to all types of devices.
Bill Joy had envisioned a new language combining the best of Mesa and C. In a paper called Further, he proposed to Sun that its engineers should produce an object-oriented environment based on C++. Initially, Gosling attempted to modify and extend C++ (which he referred to as "C++ ++ --") but soon abandoned that in favor of creating an entirely new language, which he called Oak, after the tree that stood just outside his office.
The team worked long hours and by the summer of 1992, they were able to demonstrate portions of the new platform including the Green OS, the Oak language, the libraries, and the hardware. Their first attempt, demonstrated on September 3, 1992, focused on building a PDA device named Star7[#endnote_star7] which had a graphical interface and a smart agent called "Duke" to assist the user. In November of that year, the Green Project was spun off to become FirstPerson, Inc, a wholly owned subsidiary of Sun Microsystems, and the team relocated to Palo Alto, California. The FirstPerson team was interested in building highly interactive devices, and when Time Warner issued an RFP for a set-top box, FirstPerson changed their target and responded with a proposal for a set-top box platform. However, the cable industry felt that their platform gave too much control to the user and FirstPerson lost their bid to SGI. An additional deal with The 3DO Company for a set-top box also failed to materialize. Unable to generate interest within the TV industry, the company was rolled back into Sun.
Java meets the Internet
In June and July of 1994, after three days of brainstorming with John Gage, James Gosling, Joy, Naughton, Wayne Rosing, and Eric Schmidt, the team re-targeted the platform for the Web. They felt that with the advent of the Mosaic browser, the Internet was on its way to evolving into the same highly interactive medium that they had envisioned for cable TV. As a prototype, Naughton wrote a small web browser, WebRunner, later renamed HotJava.
That year, the language was renamed Java after a trademark search revealed that the name "Oak" was used by a manufacturer of video adaptor cards (Oak Technology). The name Java was coined at a local coffee shop frequented by some of the members. It is not clear whether the name is an acronym or not; although some accounts claim that it stands for the names of James Gosling, Arthur Van Hoff, and Andy Bechtolsheim, or Just Another Vague Acronym, it is generally accepted that "Java" does not stand for anything. Lending credence to the idea that Java owes its name to the products sold at the coffee shop is the fact that the first 4 bytes (the so-called "Magic number") of any class file are, in hexadecimal, 0xCAFEBABE.
In October of 1994, HotJava and the Java platform was demonstrated for some of the Sun executives. Java 1.0a was made available for download in 1994, but the first public release of Java and the HotJava web browser was on May 23, 1995, at the SunWorld conference. The announcement was made by John Gage, the Director of Science for Sun Microsystems. His announcement was accompanied by a surprise announcement by Marc Andreessen, Executive Vice President of Netscape, that Netscape would be including Java support in its browsers. On January 9, 1996, the JavaSoft group was formed by Sun Microsystems in order to develop the technology.[link] A few weeks later the first version of Java was released.
Recent history
Web use
Client side
The ability of web browsers to run Java applets has ensured the continuing use of Java by the general public. Flash is more widespread for simple interactive animations and developers are beginning to apply Ajax techniques in this area too. Java is often applied to more complex applications like Yahoo! Games and more recently, video players from multiple suppliers (e.g. [link]).
Server side
On the server side of the Web, Java is more popular than ever#redirect , with many websites using the Java EE stack, JSF, JavaServer Pages and other Java-based technologies.
Desktop use
On the desktop, stand-alone Java applications remain relatively rare for several reasons.[link]
- Java applications often use more memory than native applications because of the overhead for the Java runtime.
- Graphical user interfaces for Java applications tend not to follow the platform-specific Human Interface Guidelines the user is accustomed to. Font smoothing is disabled by default, which makes text look low quality.
- The free tools provided in the Java Development Kit are not powerful enough to easily build useful applications, although a variety of other powerful free and commercial tools are available.
- There are several versions of the Java Runtime Environment. A user must have installed the version required by an application (or any newer version) before installation.
Mobile devices
Java applications have become hugely popular in mobile devices, where it competes with Symbian and BREW.
With Symbian, any developer can write and publish applications without paying a royalty. Symbian smartphones are the market leader with around 85% of the smartphone market.
BREW applications have access to routines which can add a charge to the telephone bill of the user. This power necessitates a strict approvals procedure managed by Qualcomm, which collects royalties for each BREW license given and controls which applications can be launched. Many CDMA vendors have opted for BREW, encouraged by their control over users' content by means of a walled garden technique, which some carriers believe will increase their profits. The main exception to this is the American CDMA carrier Sprint Nextel Corporation.
Like Symbian, developers can publish Java programs without paying a royalty. The penetration for Java is significantly higher than for Symbian, as it works on a wider range of phones, particularly popular cheaper models. This has allowed third-parties to create free applications like Opera Mini. Most GSM wireless carriers around the world use Java.
As Java runs in a sandbox, it is safe to allow independent developers to release their own software. The diversity of Java for mobile phones has led to a need for Java standards specifically for mobiles phones so programs can run on phones from different suppliers - MIDP. The first standard was MIDP 1, which assumed a small screen size, no access to audio, and a 32kB program limit. The more recent MIDP 2 allows access to audio, and up to 64kB for the program size. With handset designs improving more rapidly than the standards, some manufacturers relax some limitations in the standards, for example, maximum program size.
Java runtime availability
A version of the Java Runtime Environment is available on most desktops. Microsoft has not bundled a Java Runtime Environment with its operating systems since after Sun Microsystems sued Microsoft for adulterating the bundled Java platforms, making them produce code specifically crafted to not run on other platforms than Windows. Still, many manufacturers of Microsoft Windows systems continue to include a JRE when they ship their systems. It is also shipped as standard on Apple's Mac OS X, as well as most Linux distributions. Because of incompatibilities between different versions of the JRE, rather than rely on pre-installed JREs, many applications install their own JREs in order to function predictably. Java applets can detect which version of Java they are running on and the high level of compatibility between different versions of Java ensures it is a simple matter to support older versions of Java whilst making use of the additional features of later versions.
Version history
The Java language has undergone several changes since JDK (Java Development Kit) 1.0 as well as numerous additions of classes and packages to the standard library. Since J2SE 1.4, the evolution of the Java Language has been governed by the Java Community Process (JCP), which uses Java Specification Requests (JSRs) to propose and specify additions and changes to the Java platform. The language is specified by the Java Language Specification (JLS); changes to the JLS are managed under [JSR 901].
- JDK 1.0 (January 23, 1996) — Initial release. [press release]
- JDK 1.1 (February 19, 1997) — Major additions included: [press release]
- * an extensive retooling of the AWT event model
- * inner classes added to the language
- * JavaBeans
- * JDBC
- * RMI
- J2SE 1.2 (December 8, 1998) — Codename Playground. This and subsequent releases through J2SE 5.0 were rebranded Java 2 and the version name "J2SE" (Java 2 Platform, Standard Edition) replaced JDK to distinguish the base platform from J2EE (Java 2 Platform, Enterprise Edition) and J2ME (Java 2 Platform, Micro Edition). Major additions included: [press release]
- *
strictfpkeyword - * reflection
- * the Swing graphical API was integrated into the core classes
- * Sun's JVM was equipped with a JIT compiler for the first time
- * Java Plug-in
- * Java IDL, an IDL implementation for CORBA interoperability
- * Collections framework
- J2SE 1.3 (May 8, 2000) — Codename Kestrel. The most notable changes were:[press release] [full list of changes]
- * HotSpot JVM included (the HotSpot JVM was first released in April, 1999 for the J2SE 1.2 JVM)
- * RMI was changed to be based on CORBA
- * JavaSound
- * Java Naming and Directory Interface (JNDI) included in core libraries (previously available as an extension)
- * Java Platform Debugger Architecture (JPDA)
- J2SE 1.4 (February 6, 2002) — Codename Merlin. This was the first release of the Java platform developed under the Java Community Process as [JSR 59]. Major changes included: [press release] [full list of changes]
- *
assertkeyword (Specified in [JSR 41].) - * regular expressions modeled after Perl regular expressions
- * exception chaining allows an exception to encapsulate original lower-level exception
- * non-blocking NIO (New Input/Output) (Specified in [JSR 51].)
- * logging API (Specified in [JSR 47].)
- * image I/O API for reading and writing images in formats like JPEG and PNG
- * integrated XML parser and XSLT processor (JAXP) (Specified in [JSR 5] and [JSR 63].)
- * integrated security and cryptography extensions (JCE, JSSE, JAAS)
- * Java Web Start included (Java Web Start was first released in March, 2001 for J2SE 1.3) (Specified in [JSR 56].)
- J2SE 5.0 (September 30, 2004) — Codename Tiger. (Originally numbered 1.5, which is still used as the internal version number.[link]) Developed under [JSR 176], Tiger added a number of significant new language features: [press release] [full list of changes]
- * Generics — provides compile-time (static) type safety for collections and eliminates the need for most typecasts. (Specified by [JSR 14].)
- * Metadata — also called annotations, allows language constructs such as classes and methods to be tagged with additional data, which can then be processed by metadata-aware utilities. (Specified by [JSR 175].)
- * Autoboxing/unboxing — automatic conversions between primitive types (such as
int) and primitive wrapper classes (such as ). (Specified by [JSR 201].) - * Enumerations — the
enumkeyword creates a typesafe, ordered list of values (such asDay.MONDAY,Day.TUESDAY, etc.). Previously this could only be achieved by non-typesafe constant integers or manually constructed classes (typesafe enum pattern). (Specified by [JSR 201].) - * Varargs — the last parameter of a method can now be declared using a type name followed by three dots (e.g.
void drawtext(String... lines)). In the calling code any number of parameters of that type can be used and they are then placed in an array to be passed to the method. - * Enhanced
forloop — theforloop syntax is extended with special syntax for iterating over each member of either an array or any , such as the standard classes, using a construct of the form:
void displayWidgets (IterableThis example iterates over the Iterable object widgets, assigning each of its items in turn to the variable w, and then calling the Widget method display() for each item. (Specified by JSR 201.)
|
- Java SE 6 — Codename [Mustang]. As of 2006 this is currently in development under [JSR 270]. Beta versions were released in February and June 2006 and are available at [http://java.sun.com/javase/6/]. The final release is planned for late October 2006. New builds including enhancements and bug fixes are released approximately weekly. As of this version, Sun replaced the name "J2SE" with Java SE and dropped the ".0" from the version number.[link]
- Java SE 7 — Codename Dolphin. This is in the early planning stages. The Dolphin Project will start up in late July, with release estimated in 2008.[link]
Criticism
Sun Corporation is often being criticised by making various statements in their marketing materials that frequently misdirect the less cautious readers into believing that Java is Free software. However, Richard M. Stallman has frequently confirmed that SUN's implementation and distribution of Java could not be considered as Free software. [link]. It should be considered that a number of implementations of Java are available from other sources. IBM and BEA Systems are other providers of proprietary, non-free implementations that compete with SUN's implementation. GNU's GCJ is a free implementation of Java.See also
- ARM9E, a CPU family with direct Java bytecode execution ability
- Common Intermediate Language (CIL), a similar bytecode specification that runs on the CLR of the .NET Framework.
- C to Java Virtual Machine compilers
External links
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

