Java (Sun)
Encyclopedia
Java refers to several computer software
Computer software
Computer software, or just software, is a collection of computer programs and related data that provide the instructions for telling a computer what to do and how to do it....

 products and specifications from Sun Microsystems
Sun Microsystems
Sun Microsystems, Inc. was a company that sold :computers, computer components, :computer software, and :information technology services. Sun was founded on February 24, 1982...

, a subsidiary of Oracle Corporation
Oracle Corporation
Oracle Corporation is an American multinational computer technology corporation that specializes in developing and marketing hardware systems and enterprise software products – particularly database management systems...

, that together provide a system for developing application software
Application software
Application software, also known as an application or an "app", is computer software designed to help the user to perform specific tasks. Examples include enterprise software, accounting software, office suites, graphics software and media players. Many application programs deal principally with...

 and deploying it in a cross-platform
Cross-platform
In computing, cross-platform, or multi-platform, is an attribute conferred to computer software or computing methods and concepts that are implemented and inter-operate on multiple computer platforms...

 environment. Java is used in a wide variety of computing platforms from embedded devices and mobile phone
Mobile phone
A mobile phone is a device which can make and receive telephone calls over a radio link whilst moving around a wide geographic area. It does so by connecting to a cellular network provided by a mobile network operator...

s on the low end, to enterprise servers and supercomputer
Supercomputer
A supercomputer is a computer at the frontline of current processing capacity, particularly speed of calculation.Supercomputers are used for highly calculation-intensive tasks such as problems including quantum physics, weather forecasting, climate research, molecular modeling A supercomputer is a...

s on the high end. While less common on desktop computer
Desktop computer
A desktop computer is a personal computer in a form intended for regular use at a single location, as opposed to a mobile laptop or portable computer. Early desktop computers are designed to lay flat on the desk, while modern towers stand upright...

s, Java applet
Java applet
A Java applet is an applet delivered to users in the form of Java bytecode. Java applets can run in a Web browser using a Java Virtual Machine , or in Sun's AppletViewer, a stand-alone tool for testing applets...

s are sometimes used to provide improved and secure functions while browsing the World Wide Web
World Wide Web
The World Wide Web is a system of interlinked hypertext documents accessed via the Internet...

.

Writing in the Java programming language
Java (programming language)
Java is a programming language originally developed by James Gosling 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...

 is the primary way to produce code that will be deployed as Java bytecode
Java bytecode
Java bytecode is the form of instructions that the Java virtual machine executes. Each bytecode opcode is one byte in length, although some require parameters, resulting in some multi-byte instructions. Not all of the possible 256 opcodes are used. 51 are reserved for future use...

. There are, however, bytecode compiler
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...

s available for other languages such as Ada
Ada (programming language)
Ada is a structured, statically typed, imperative, wide-spectrum, and object-oriented high-level computer programming language, extended from Pascal and other languages...

, JavaScript
JavaScript
JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles....

, Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

, and Ruby
Ruby (programming language)
Ruby is a dynamic, reflective, general-purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features. Ruby originated in Japan during the mid-1990s and was first developed and designed by Yukihiro "Matz" Matsumoto...

. Several new languages have been designed to run natively on the Java Virtual Machine
Java Virtual Machine
A Java virtual machine is a virtual machine capable of executing Java bytecode. It is the code execution component of the Java software platform. Sun Microsystems stated that there are over 4.5 billion JVM-enabled devices.-Overview:...

 (JVM), such as Scala, Clojure
Clojure
Clojure |closure]]") is a recent dialect of the Lisp programming language created by Rich Hickey. It is a general-purpose language supporting interactive development that encourages a functional programming style, and simplifies multithreaded programming....

 and Groovy. Java syntax
Java syntax
The syntax of the Java programming language is a set of rules which defines how a Java program is written and interpreted.The syntax is mostly derived from C and C++. Unlike C++, Java is almost exclusively an object-oriented language. There are no global functions or variables, all code belongs to...

 borrows heavily from C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 and C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

, but object-oriented features are modeled after Smalltalk
Smalltalk
Smalltalk is an object-oriented, dynamically typed, reflective programming language. Smalltalk was created as the language to underpin the "new world" of computing exemplified by "human–computer symbiosis." It was designed and created in part for educational use, more so for constructionist...

 and Objective-C
Objective-C
Objective-C is a reflective, object-oriented programming language that adds Smalltalk-style messaging to the C programming language.Today, it is used primarily on Apple's Mac OS X and iOS: two environments derived from the OpenStep standard, though not compliant with it...

. Java 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
Reference (computer science)
In computer science, a reference is a value that enables a program to indirectly access a particular data item, such as a variable or a record, in the computer's memory or in some other storage device. The reference is said to refer to the data item, and accessing those data is called...

. Memory management is handled through integrated automatic garbage collection
Garbage collection (computer science)
In computer science, garbage collection is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program...

 performed by the JVM.

On November 13, 2006, Sun Microsystems made the bulk of its implementation of Java available under the GNU General Public License
GNU General Public License
The GNU General Public License is the most widely used free software license, originally written by Richard Stallman for the GNU Project....

 (GPL), although there are still a few parts distributed as precompiled binaries due to copyright issues with code that is licensed (but not owned) by Sun.

Platform

An edition of the Java platform is the name for a bundle of related programs from Sun that allow for developing and running programs written in the Java
Java (programming language)
Java is a programming language originally developed by James Gosling 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...

 programming language. The platform is not specific to any one processor or operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

, but rather an execution engine (called a virtual machine
Virtual machine
A virtual machine is a "completely isolated guest operating system installation within a normal host operating system". Modern virtual machines are implemented with either software emulation or hardware virtualization or both together.-VM Definitions:A virtual machine is a software...

) and a compiler with a set of libraries that are implemented for various hardware and operating systems so that Java programs can run identically on all of them.
  • Java Card
    Java Card
    Java Card refers to a technology that allows Java-dd applications to be run securely on smart cards and similar small memory footprint devices. Java Card is the tiniest of Java targeted for embedded devices. Java Card gives the user ability to program the device and make them application...

    : A technology that allows small Java-based applications (applet
    Applet
    In computing, an applet is any small application that performs one specific task that runs within the scope of a larger program, often as a plug-in. An applet typically also refers to Java applets, i.e., programs written in the Java programming language that are included in a web page...

    s) to be run securely on smart card
    Smart card
    A smart card, chip card, or integrated circuit card , is any pocket-sized card with embedded integrated circuits. A smart card or microprocessor cards contain volatile memory and microprocessor components. The card is made of plastic, generally polyvinyl chloride, but sometimes acrylonitrile...

    s and similar small-memory devices.
  • Java ME (Micro Edition): Specifies several different sets of libraries (known as profiles) for devices that 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.


, the current version of the Java platform is specified as either 1.7.0 or 7 (both refer to the same version). Version 7 is the product version, while 1.7.0 is the developer version.

The Java platform consists of several programs, each of which provides a distinct portion of its overall capabilities. For example, the Java compiler, which converts Java source code into Java bytecode (an intermediate language for the Java Virtual Machine
Java Virtual Machine
A Java virtual machine is a virtual machine capable of executing Java bytecode. It is the code execution component of the Java software platform. Sun Microsystems stated that there are over 4.5 billion JVM-enabled devices.-Overview:...

 (JVM)), is provided as part of the Java Development Kit
Java Development Kit
The Java Development Kit is an Oracle Corporation product aimed at Java developers. Since the introduction of Java, it has been by far the most widely used Java SDK. On 17 November 2006, Sun announced that it would be released under the GNU General Public License , thus making it free software...

 (JDK). The Java Runtime Environment (JRE), complementing the JVM with a just-in-time (JIT) compiler
Just-in-time compilation
In computing, just-in-time compilation , also known as dynamic translation, is a method to improve the runtime performance of computer programs. Historically, computer programs had two modes of runtime operation, either interpreted or static compilation...

, converts intermediate bytecode into native machine code on the fly. Also supplied are extensive libraries, precompiled in which are several other components, some available only in certain editions.

The essential components in the platform are the Java language compiler, the libraries, and the runtime environment in which Java intermediate bytecode "executes" according to the rules laid out in the virtual machine specification.

Java Virtual Machine

The heart of the Java platform is the concept of a "virtual machine" that executes Java bytecode
Java bytecode
Java bytecode is the form of instructions that the Java virtual machine executes. Each bytecode opcode is one byte in length, although some require parameters, resulting in some multi-byte instructions. Not all of the possible 256 opcodes are used. 51 are reserved for future use...

 programs. This bytecode is the same no matter what hardware or operating system the program is running under. There is a JIT compiler within the Java Virtual Machine, or JVM. The JIT compiler translates the Java bytecode into native processor instructions at run-time and caches the native code in memory during execution.

The use of bytecode as an intermediate language permits Java programs to run on any platform that has a virtual machine available. The use of a JIT compiler means that Java applications, after a short delay during loading and once they have "warmed up" by being all or mostly JIT-compiled, tend to run about as fast as native programs.
Since JRE version 1.2, Sun's JVM implementation has included a just-in-time compiler
Just-in-time compilation
In computing, just-in-time compilation , also known as dynamic translation, is a method to improve the runtime performance of computer programs. Historically, computer programs had two modes of runtime operation, either interpreted or static compilation...

 instead of an interpreter.

Although Java programs are cross-platform
Cross-platform
In computing, cross-platform, or multi-platform, is an attribute conferred to computer software or computing methods and concepts that are implemented and inter-operate on multiple computer platforms...

 or platform independent, the code of the Java Virtual Machines (JVM) that execute these programs is not. Every supported operating platform has its own JVM.

Class libraries

In most modern operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s (OSs), a large body of reusable code is provided to simplify the programmer's job. This code is typically provided as a set of dynamically loadable libraries that applications can call at runtime. Because the Java platform is not dependent on any specific operating system, applications cannot rely on any of the pre-existing OS libraries. Instead, the Java platform provides a comprehensive set of its own standard class libraries containing much of the same reusable functions commonly found in modern operating systems. Most of the system library is also written in Java. For instance, Swing
Swing (Java)
Swing is the primary Java GUI widget toolkit. It is part of Oracle's Java Foundation Classes — an API for providing a graphical user interface for Java programs....

 library paints the user interface and handles the events itself, eliminating many subtle differences between how different platforms handle even similar components.

The Java class libraries serve three purposes within the Java platform. First, like other standard code libraries, the Java libraries provide the programmer a well-known set of functions to perform common tasks, such as maintaining lists of items or performing complex string parsing. Second, the class libraries provide an abstract interface to tasks that would normally depend heavily on the hardware and operating system. Tasks such as network access and file access are often heavily intertwined with the distinctive implementations of each platform. The java.net and java.io libraries implement an abstraction layer in native OS code, then provide a standard interface for the Java applications to perform those tasks. Finally, when some underlying platform does not support all of the features a Java application expects, the class libraries work to gracefully handle the absent components, either by emulation to provide a substitute, or at least by providing a consistent way to check for the presence of a specific feature.

Languages

The word Java, alone, usually refers to the Java programming language that was designed for use with the Java platform. Programming languages are typically outside of the scope of the phrase "platform", although the Java programming language is listed as a core part of the Java platform. The language and runtime are therefore commonly considered a single unit.

Nevertheless, third parties have produced many compiler
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...

s or interpreters
Interpreter (computing)
In computer science, an interpreter normally means a computer program that executes, i.e. performs, instructions written in a programming language...

 that target the JVM. Some of these are for existing languages, while others are for extensions to the Java language. These include:
  • BeanShell
    BeanShell
    BeanShell is a Java scripting language, invented by Patrick Niemeyer. It runs in the Java Runtime Environment and uses Java syntax, in addition to scripting commands and syntax.- Features :...

     a lightweight scripting language for Java
  • Clojure
    Clojure
    Clojure |closure]]") is a recent dialect of the Lisp programming language created by Rich Hickey. It is a general-purpose language supporting interactive development that encourages a functional programming style, and simplifies multithreaded programming....

  • Groovy
  • JRuby
    JRuby
    JRuby is a Java implementation of the Ruby programming language, being developed by the JRuby team. It is free software released under a three-way CPL/GPL/LGPL license...

    , a Ruby
    Ruby (programming language)
    Ruby is a dynamic, reflective, general-purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features. Ruby originated in Japan during the mid-1990s and was first developed and designed by Yukihiro "Matz" Matsumoto...

     interpreter
  • Jython
    Jython
    Jython, successor of JPython, is an implementation of the Python programming language written in Java.-Overview:Jython programs can seamlessly import and use any Java class. Except for some standard modules, Jython programs use Java classes instead of Python modules...

    , a Python
    Python (programming language)
    Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

     interpreter that includes jythonc, a Python-to-Java bytecode compiler
  • Rhino
    Rhino (JavaScript engine)
    Rhino is an open source JavaScript engine. It is developed entirely in Java and managed by the Mozilla Foundation. The Foundation also provides another implementation of JavaScript engine written in C known as SpiderMonkey....

    , a JavaScript
    JavaScript
    JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles....

     interpreter
  • Scala

Similar platforms

The success of Java and its write once, run anywhere
Write once, run anywhere
"Write once, run anywhere" , or sometimes write once, run everywhere , is a slogan created by Sun Microsystems to illustrate the cross-platform benefits of the Java language. Ideally, this means Java can be developed on any device, compiled into a standard bytecode and be expected to run on any...

 concept has led to other similar efforts, notably the .NET Framework
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...

, appearing since 2002, which incorporates many of the successful aspects of Java. .NET in its complete form (Microsoft's implementation) is currently only fully available on Windows platforms, whereas Java is fully available on many platforms. .NET was built from the ground-up to support multiple programming languages, while the Java platform was initially built to support only the Java language, although many other languages have been made for JVM since.

.NET includes a Java-like language called Visual J#
J Sharp
Visual J# |sharp]]') programming language is a discontinued transitional language for programmers of Java and Visual J++ languages, so they may use their existing knowledge and applications on .NET Framework....

 (formerly named J++
Visual J++
Visual J++ was Microsoft's specific implementation of Java. Syntax, keywords, and grammatical conventions were the same as Java's. Microsoft discontinued support of J++ in January 2004, replacing it to a certain extent with J# and C#....

) that is incompatible with the Java specification, and the associated class library mostly dates to the old JDK 1.1 version of the language. For these reasons, it is more a transitional language to switch from Java to the .NET platform, than a first class .NET language. Visual J# was discontinued with the release of Microsoft Visual Studio 2008. The existing version shipping with Visual Studio 2005
Microsoft Visual Studio
Microsoft Visual Studio is an integrated development environment from Microsoft. It is used to develop console and graphical user interface applications along with Windows Forms applications, web sites, web applications, and web services in both native code together with managed code for all...

 will be supported until 2015 as per the product life-cycle strategy.

Java Development Kit

The Java Development Kit (JDK) is a Sun
Sun Microsystems
Sun Microsystems, Inc. was a company that sold :computers, computer components, :computer software, and :information technology services. Sun was founded on February 24, 1982...

 product aimed at Java developers. Since the introduction of Java, it has been by far the most widely used Java software development kit
Software development kit
A software development kit is typically a set of software development tools that allows for the creation of applications for a certain software package, software framework, hardware platform, computer system, video game console, operating system, or similar platform.It may be something as simple...

 (SDK). It contains a Java compiler, a full copy of the Java Runtime Environment (JRE), and many other important development tools.

History

The Java platform and language began as an internal project at Sun Microsystems
Sun Microsystems
Sun Microsystems, Inc. was a company that sold :computers, computer components, :computer software, and :information technology services. Sun was founded on February 24, 1982...

 in December 1990, providing an alternative to the C++/C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 programming languages. Engineer Patrick Naughton
Patrick Naughton
Patrick Naughton is an American software developer, best known as being one of the original creators of the Java programming language.-Working for Sun:...

 had become increasingly frustrated with the state of Sun's C++ and C application programming interface
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

s (APIs) and tools. While considering moving to NeXT
NeXT
Next, Inc. was an American computer company headquartered in Redwood City, California, that developed and manufactured a series of computer workstations intended for the higher education and business markets...

, 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
James Gosling
James A. Gosling, OC is a computer scientist, best known as the father of the Java programming language.-Education and career:In 1977, Gosling received a B.Sc in Computer Science from the University of Calgary...

 and Mike Sheridan joining Naughton. Together with other engineers, they began work in a small office on Sand Hill Road
Sand Hill Road
Sand Hill Road is a road in Menlo Park, California, notable for its concentration of venture capital companies. Its significance as a symbol of private equity in the United States may be compared to that of Wall Street in the stock market...

 in Menlo Park, California
Menlo Park, California
Menlo Park, California is a city at the eastern edge of San Mateo County, in the San Francisco Bay Area of California, in the United States. It is bordered by San Francisco Bay on the north and east; East Palo Alto, Palo Alto, and Stanford to the south; Atherton, North Fair Oaks, and Redwood City...

. 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
Embedded system
An embedded system is a computer system designed for specific control functions within a larger system. often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. By contrast, a general-purpose computer, such as a personal...

 with limited resources, they decided that C++ needed too much memory and that its complexity led to developer errors. The language's lack of garbage collection
Garbage collection (computer science)
In computer science, garbage collection is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program...

 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
Thread (computer science)
In computer science, a thread of execution is the smallest unit of processing that can be scheduled by an operating system. The implementation of threads and processes differs from one operating system to another, but in most cases, a thread is contained inside a process...

. Finally, they wanted a platform that could be easily ported to all types of devices.

Bill Joy
Bill Joy
William Nelson Joy , commonly known as Bill Joy, is an American computer scientist. Joy co-founded Sun Microsystems in 1982 along with Vinod Khosla, Scott McNealy and Andy Bechtolsheim, and served as chief scientist at the company until 2003...

 had envisioned a new language combining Mesa and C. In a paper called Further, he proposed to Sun that its engineers should produce an object-oriented
Object-oriented programming
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...

 environment based on C++. Initially, Gosling attempted to modify and extend C++ (that he referred to as "C++ ++ --") but soon abandoned that in favor of creating a new language, which he called Oak
Oak (programming language)
Oak was a programming language created by James Gosling in 1991, initially for Sun Microsystems set-top box project. The language later evolved to become Java.The name Oak was used by Gosling after an oak tree that stood outside his office.-History:...

, after the tree that stood just outside his office.

By the summer of 1992, they were able to demonstrate portions of the new platform including the Green OS
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

, the Oak language, the libraries, and the hardware. Their first attempt, demonstrated on September 3, 1992, focused on building a personal digital assistant
Personal digital assistant
A personal digital assistant , also known as a palmtop computer, or personal data assistant, is a mobile device that functions as a personal information manager. Current PDAs often have the ability to connect to the Internet...

 (PDA) device named Star7 that 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, a wholly owned subsidiary of Sun Microsystems, and the team relocated to Palo Alto, California
Palo Alto, California
Palo Alto is a California charter city located in the northwest corner of Santa Clara County, in the San Francisco Bay Area of California, United States. The city shares its borders with East Palo Alto, Mountain View, Los Altos, Los Altos Hills, Stanford, Portola Valley, and Menlo Park. It is...

. The firstperson team was interested in building highly interactive devices, and when Time Warner
Time Warner
Time Warner is one of the world's largest media companies, headquartered in the Time Warner Center in New York City. Formerly two separate companies, Warner Communications, Inc...

 issued a request for proposal
Request for Proposal
A request for proposal is issued at an early stage in a procurement process, where an invitation is presented for suppliers, often through a bidding process, to submit a proposal on a specific commodity or service. The RFP process brings structure to the procurement decision and is meant to...

 (RFP) for a set-top box
Set-top box
A set-top box or set-top unit is an information appliance device that generally contains a tuner and connects to a television set and an external source of signal, turning the signal into content which is then displayed on the television screen or other display device.-History:Before the...

, 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
Silicon Graphics
Silicon Graphics, Inc. was a manufacturer of high-performance computing solutions, including computer hardware and software, founded in 1981 by Jim Clark...

. An additional deal with The 3DO Company
The 3DO Company
The 3DO Company , also known as 3DO , was a video game 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 1994, after three days of brainstorming with John Gage
John Gage
John Burdette Gage was the 21st employee of Sun Microsystems, where he is credited with creating the phrase "the network is the computer." He served as Chief Researcher and Vice President of the Science Office for Sun, until leaving on June 9, 2008 to join Kleiner Perkins Caufield & Byers as a...

, the Director of Science for Sun, Gosling, Joy, Naughton, Wayne Rosing
Wayne Rosing
Wayne Rosing has been involved as a key player in several landmark projects in the computing industry since the late 1970s. Gaining experience as an engineering manager at DEC and Data General in the 1970s, he became a director of engineering at Apple Computer in the early 1980s. There he led the...

, and Eric Schmidt, the team re-targeted the platform for the World Wide Web
World Wide Web
The World Wide Web is a system of interlinked hypertext documents accessed via the Internet...

. They felt that with the advent of graphical web browsers like Mosaic
Mosaic (web browser)
Mosaic is the web browser credited with popularizing the World Wide Web. It was also a client for earlier protocols such as FTP, NNTP, and gopher. Its clean, easily understood user interface, reliability, Windows port and simple installation all contributed to making it the application that opened...

, 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 browser, WebRunner (named after the movie Blade Runner
Blade Runner
Blade Runner is a 1982 American science fiction film directed by Ridley Scott and starring Harrison Ford, Rutger Hauer, and Sean Young. The screenplay, written by Hampton Fancher and David Peoples, is loosely based on the novel Do Androids Dream of Electric Sheep? by Philip K...

), later renamed HotJava
HotJava
HotJava was a modular, extensible web browser from Sun Microsystems implemented in Java. It was the first browser to support Java applets, and was Sun's demonstration platform for the then new technology. It has since been discontinued and is now no longer supported...

.

That year, the language was renamed Java after a trademark
Trademark
A trademark, trade mark, or trade-mark is a distinctive sign or indicator used by an individual, business organization, or other legal entity to identify that the products or services to consumers with which the trademark appears originate from a unique source, and to distinguish its products or...

 search revealed that Oak was used by Oak Technology
Oak Technology
Oak Technology was a supplier of semiconductor chips for sound cards, graphics cards and optical storage devices such as CD-ROM, CD-RW and DVD. In 2003, it was acquired by Zoran Corporation....

. Although Java 1.0a was available for download in 1994, the first public release of Java was 1.0a2 with the HotJava browser on May 23, 1995, announced by Gage at the SunWorld conference. His announcement was accompanied by a surprise announcement by Marc Andreessen
Marc Andreessen
Marc Andreessen is an American entrepreneur, investor, software engineer, and multi-millionaire best known as co-author of Mosaic, the first widely-used web browser, and co-founder of Netscape Communications Corporation. He founded and later sold the software company Opsware to Hewlett-Packard...

, Executive Vice President of Netscape Communications Corporation, that Netscape browsers would be including Java support. On January 9, 1996, the JavaSoft group was formed by Sun Microsystems to develop the technology.

Version history

The Java language has undergone several changes since JDK (Java Development Kit
Java Development Kit
The Java Development Kit is an Oracle Corporation product aimed at Java developers. Since the introduction of Java, it has been by far the most widely used Java SDK. On 17 November 2006, Sun announced that it would be released under the GNU General Public License , thus making it free software...

) 1.0 was released on (January 23, 1996), as well as numerous additions of classes and packages to the standard library
Library (computer science)
In computer science, a library is a collection of resources used to develop software. These may include pre-written code and subroutines, classes, values or type specifications....

. Since J2SE 1.4, the evolution of the Java Language has been governed by the Java Community Process
Java Community Process
The Java Community Process or JCP, established in 1998, is a formalized process that allows interested parties to get involved in the definition of future versions and features of the Java platform....

 (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.1 was released on February 19, 1997. Major additions included an extensive retooling of the AWT
Abstract Window Toolkit
The Abstract Window Toolkit is Java's original platform-independent windowing, graphics, and user-interface widget toolkit. The AWT is now part of the Java Foundation Classes — the standard API for providing a graphical user interface for a Java program.AWT is also the GUI toolkit for a...

 event model, inner class
Inner class
In object-oriented programming , an inner class or nested class is a class declared entirely within the body of another class or interface. It is distinguished from a subclass.-Overview:...

es added to the language, JavaBeans and JDBC
Java Database Connectivity
Java DataBase Connectivity, commonly referred to as JDBC, is an API for the Java programming language that defines how a client may access a database. It provides methods for querying and updating data in a database. JDBC is oriented towards relational databases...

.

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
Java Platform, Standard Edition
Java Platform, Standard Edition or Java SE is a widely used platform for programming in the Java language. It is the Java Platform used to deploy portable applications for general use...

) replaced JDK to distinguish the base platform from J2EE (Java 2 Platform, Enterprise Edition
Java Platform, Enterprise Edition
Java Platform, Enterprise Edition or Java EE is widely used platform for server programming in the Java programming language. The Java platform differs from the Java Standard Edition Platform in that it adds libraries which provide functionality to deploy fault-tolerant, distributed, multi-tier...

) and J2ME (Java 2 Platform, Micro Edition
Java Platform, Micro Edition
Java Platform, Micro Edition, or Java ME, is a Java platform designed for embedded systems . Target devices range from industrial controls to mobile phones and set-top boxes...

). Major additions included reflection
Reflection (computer science)
In computer science, reflection is the process by which a computer program can observe and modify its own structure and behavior at runtime....

, a collections
Container (data structure)
In computer science, a container is a class, a data structure, or an abstract data type whose instances are collections of other objects. In other words; they are used for storing objects in an organized way following specific access rules...

 framework, Java IDL (an interface description language
Interface description language
An interface description language , or IDL for short, is a specification language used to describe a software component's interface...

 implementation for CORBA
Çorba
Chorba , ciorbă , shurpa , shorpo , or sorpa is one of various kinds of soup or stew found in national cuisines across Middle East...

 interoperability), and the integration of the Swing
Swing (Java)
Swing is the primary Java GUI widget toolkit. It is part of Oracle's Java Foundation Classes — an API for providing a graphical user interface for Java programs....

 graphical API into the core classes. A Java Plug-in was released, and Sun's JVM was equipped with a JIT compiler
Just-in-time compilation
In computing, just-in-time compilation , also known as dynamic translation, is a method to improve the runtime performance of computer programs. Historically, computer programs had two modes of runtime operation, either interpreted or static compilation...

 for the first time.

J2SE 1.3 (May 8, 2000) — Codename Kestrel. Notable changes included the bundling of the HotSpot
HotSpot
HotSpot is a Java virtual machine for desktops and servers, maintained and distributed by Oracle Corporation. It features techniques such as just-in-time compilation and adaptive optimization designed to improve performance.-History:...

 JVM (the HotSpot JVM was first released in April, 1999 for the J2SE 1.2 JVM), JavaSound, Java Naming and Directory Interface
Java Naming and Directory Interface
The Java Naming and Directory Interface is a Java API for a directory service that allows Java software clients to discover and look up data and objects via a name. Like all Java APIs that interface with host systems, JNDI is independent of the underlying implementation...

 (JNDI) and Java Platform Debugger Architecture
Java Platform Debugger Architecture
The Java Platform Debugger Architecture is a collection of APIs to debug Java code.* Java Debugger Interface - defines a high-level Java language interface which developers can easily use to write remote debugger application tools....

 (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 regular expressions modeled after Perl
Perl
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions and become widely popular...

, exception chaining
Exception chaining
Exception chaining, or exception wrapping, is an object-oriented programming technique of handling exceptions by re-throwing a caught exception after wrapping it inside a new exception. The original exception is saved as a property of the new exception...

, an integrated XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 parser and XSLT
XSLT
XSLT is a declarative, XML-based language used for the transformation of XML documents. The original document is not changed; rather, a new document is created based on the content of an existing one. The new document may be serialized by the processor in standard XML syntax or in another format,...

 processor (JAXP
Java API for XML Processing
The Java API for XML Processing, or JAXP , is one of the Java XML programming APIs. It provides the capability of validating and parsing XML documents...

), and Java Web Start
Java Web Start
In computing, Java Web Start is a framework developed by Sun Microsystems that allows users to start application software for the Java Platform directly from the Internet using a web browser....

.

J2SE 5.0 (September 30, 2004) — Codename Tiger. Originally numbered 1.5, which is still used as the internal version number. Developed under JSR 176, Tiger added several significant new language features including the for-each loop, generics
Generic programming
In a broad definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters...

, autoboxing and var-args
Variadic function
In computer programming, a variadic function is a function of indefinite arity, i.e., one which accepts a variable number of arguments. Support for variadic functions differs widely among programming languages....

.

Java SE 6 (December 11, 2006) — Codename Mustang — is bundled with a database manager and facilitates the use of scripting languages (currently JavaScript
JavaScript
JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles....

 using Mozilla
Mozilla
Mozilla is a term used in a number of ways in relation to the Mozilla.org project and the Mozilla Foundation, their defunct commercial predecessor Netscape Communications Corporation, and their related application software....

's Rhino
Rhino (JavaScript engine)
Rhino is an open source JavaScript engine. It is developed entirely in Java and managed by the Mozilla Foundation. The Foundation also provides another implementation of JavaScript engine written in C known as SpiderMonkey....

 engine) with the JVM. As of this version, Sun replaced the name "J2SE" with Java SE and dropped the ".0" from the version number. Other major changes include support for pluggable annotations
Java annotation
An annotation, in the Java computer programming language, is a special form of syntactic metadata that can be added to Java source code. Classes, methods, variables, parameters and packages may be annotated...

 (JSR 269), lots of GUI
Gui
Gui or guee is a generic term to refer to grilled dishes in Korean cuisine. These most commonly have meat or fish as their primary ingredient, but may in some cases also comprise grilled vegetables or other vegetarian ingredients. The term derives from the verb, "gupda" in Korean, which literally...

 improvements, including native UI enhancements to support the look and feel of Windows Vista
Windows Vista
Windows Vista is an operating system released in several variations developed by Microsoft for use on personal computers, including home and business desktops, laptops, tablet PCs, and media center PCs...

, and improvements to the Java Platform Debugger Architecture
Java Platform Debugger Architecture
The Java Platform Debugger Architecture is a collection of APIs to debug Java code.* Java Debugger Interface - defines a high-level Java language interface which developers can easily use to write remote debugger application tools....

 (JPDA) & JVM Tool Interface for better monitoring and troubleshooting

The current version, Java SE 7 (July 28, 2011) — Codename Dolphin, was developed under JSR 336. This version added many small language changes including strings in switch, try-with-resources and type inference for generic instance creation. The JVM was extended with support for dynamic languages, while the class library was extended among others with a join/fork framework, an improved new file I/O library and support for new network protocols such as SCTP.

In addition to the language changes, much more dramatic changes have been made to the Java class library over the years, which has grown from a few hundred classes in JDK 1.0 to over three thousand in J2SE 5.0. Entire new APIs, such as Swing
Swing (Java)
Swing is the primary Java GUI widget toolkit. It is part of Oracle's Java Foundation Classes — an API for providing a graphical user interface for Java programs....

 and Java 2D
Java 2D
In computing, Java 2D is an API for drawing two-dimensional graphics using the Java programming language. Every Java 2D drawing operation can ultimately be treated as filling a shape using a paint and compositing the result onto the screen....

, have been introduced, and many of the original JDK 1.0 classes and methods have been deprecated
Deprecation
In the process of authoring computer software, its standards or documentation, deprecation is a status applied to software features to indicate that they should be avoided, typically because they have been superseded...

.

Desktop use

According to Sun, the Java Runtime Environment is found on over 700 million PCs. Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

 has not bundled a Java Runtime Environment
Java Virtual Machine
A Java virtual machine is a virtual machine capable of executing Java bytecode. It is the code execution component of the Java software platform. Sun Microsystems stated that there are over 4.5 billion JVM-enabled devices.-Overview:...

 (JRE) with its operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s since Sun Microsystems sued Microsoft for adding Windows-specific classes to the bundled Java runtime environment, and for making the new classes available through Visual J++
Visual J++
Visual J++ was Microsoft's specific implementation of Java. Syntax, keywords, and grammatical conventions were the same as Java's. Microsoft discontinued support of J++ in January 2004, replacing it to a certain extent with J# and C#....

. A Java runtime environment is bundled with Apple's Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

 (although as of the Java for Mac OS X 10.6 Update 3 release, the Apple-supplied runtime is deprecated and may be removed from future OS releases), and many Linux distribution
Linux distribution
A Linux distribution is a member of the family of Unix-like operating systems built on top of the Linux kernel. Such distributions are operating systems including a large collection of software applications such as word processors, spreadsheets, media players, and database applications...

s include the partially compatible free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 package GNU Classpath
GNU Classpath
GNU Classpath is a project aiming to create a free software implementation of the standard class library for the Java programming language. Despite the massive size of the library to be created, the majority of the task is already done, including Swing, CORBA, and other major parts. The Classpath...

 and increasingly mostly compatible IcedTea
IcedTea
IcedTea is a build and integration project for OpenJDK launched by Red Hat in June 2007. The initial goal was to make the Java OpenJDK software which Sun Microsystems released as free software in 2007 usable without requiring any other software that is not free software and hence make it possible...

.

Some Java applications are in fairly widespread desktop use, including the NetBeans
NetBeans
NetBeans refers to both a platform framework for Java desktop applications, and an integrated development environment for developing with Java, JavaScript, PHP, Python, Groovy, C, C++, Scala, Clojure, and others...

 and Eclipse
Eclipse (software)
Eclipse is a multi-language software development environment comprising an integrated development environment and an extensible plug-in system...

 integrated development environment
Integrated development environment
An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...

s, and file sharing clients such as LimeWire
LimeWire
LimeWire is a free peer-to-peer file sharing client program that runs on Windows, Mac OS X, Linux, and other operating systems supported by the Java software platform. LimeWire uses the gnutella network as well as the BitTorrent protocol. A free software version and a purchasable "enhanced"...

 and Vuze
Vuze
Vuze is a BitTorrent client used to transfer files via the BitTorrent protocol. Vuze is written in Java, and uses the Azureus Engine. In addition to downloading data linked to by .torrent files, Azureus allows users to view, publish and share original DVD and HD quality video content...

. Java is also used in the MATLAB
MATLAB
MATLAB is a numerical computing environment and fourth-generation programming language. Developed by MathWorks, MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages,...

 mathematics programming environment, both for rendering the user interface
User interface
The user interface, in the industrial design field of human–machine interaction, is the space where interaction between humans and machines occurs. The goal of interaction between a human and a machine at the user interface is effective operation and control of the machine, and feedback from the...

 and as part of the core system. Java provides cross platform user interface for some high end collaborative applications like Lotus Notes.

Mobile devices

Java ME has become popular in mobile devices, where it competes with Symbian
Symbian
Symbian is a mobile operating system and computing platform designed for smartphones and currently maintained by Accenture. The Symbian platform is the successor to Symbian OS and Nokia Series 60; unlike Symbian OS, which needed an additional user interface system, Symbian includes a user...

, BREW, and the .NET Compact Framework
.NET Compact Framework
The Microsoft .NET Compact Framework is a version of the .NET Framework that is designed to run on resource constrained mobile/embedded devices such as personal digital assistants , mobile phones, factory controllers, set-top boxes, etc...

.

The diversity of mobile phone manufacturers has led to a need for new unified standards so programs can run on phones from different suppliers - MIDP
Mobile Information Device Profile
Mobile Information Device Profile is a specification published for the use of Java on embedded devices such as mobile phones and PDAs. MIDP is part of the Java Platform, Micro Edition framework and sits on top of Connected Limited Device Configuration , a set of lower level programming...

. 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.

Google's Android operating system uses the Java language, but not its class libraries, therefore the Android platform cannot be called Java. Android executes the code on the Dalvik VM instead of the Java VM.

Web server and enterprise use

The Java platform has become a mainstay of enterprise IT development since the introduction of the Enterprise Edition in 1998, in two different ways:
  1. Through the coupling of Java to the web server, the Java platform has become a leading platform for integrating the Web with enterprise backend systems. This has allowed companies to move part or all of their business to the Internet environment by way of highly interactive online environments (such as highly dynamic websites) that allow the customer direct access to the business processes (e.g. online banking websites, airline booking systems and so on). This trend has continued from its initial Web-based start:
    • The Java platform has matured into an Enterprise Integration role in which legacy systems are unlocked to the outside world through bridges built on the Java platform. This trend has been supported for Java platform support for EAI
      Enterprise application integration
      Enterprise Application Integration is defined as the use of software and computer systems architectural principles to integrate a set of enterprise computer applications.- Overview :...

       standards like messaging and Web services and has fueled the inclusion of the Java platform as a development basis in such standards as SCA
      Software Communications Architecture
      The Software Communications Architecture is an open architecture framework that tells designers how elements of hardware and software are to operate in harmony within a software defined radio. SCA governs the structure and operation of the U.S...

      , XAM
      Xam
      XAM, or the eXtensible Access Method, is a storage standard developed and maintained by the Storage Networking Industry Association . It is in the process of being ratified as an ANSI standard. XAM is an API for fixed content aware storage devices. XAM replaces the various proprietary interfaces...

       and others.
    • Java has become the standard development platform for many companies' IT departments, which do most or all of their corporate development in Java. This type of development is usually related to company-specific tooling (e.g. a booking tool for an airline) and the choice for the Java platform is often driven by a desire to leverage the existing Java infrastructure to build highly intelligent and interconnected tools.
  2. The Java platform has become the main development platform for many software tools and platforms that are produced by third-party software groups (commercial, open source and hybrid) and are used as configurable (rather than programmable) tools by companies. Examples in this category include Web servers, application servers, databases, enterprise service buses, business process management
    Business process management
    Business process management is a holistic management approach focused on aligning all aspects of an organization with the wants and needs of clients. It promotes business effectiveness and efficiency while striving for innovation, flexibility, and integration with technology. BPM attempts to...

     (BPM) tools and content management system
    Content management system
    A content management system is a system providing a collection of procedures used to manage work flow in a collaborative environment. These procedures can be manual or computer-based...

    s.


Enterprise use of Java has also long been the main driver of open source interest in the platform. This interest has inspired open source communities to produce a large amount of software, including simple function libraries, development frameworks (e.g. the Spring Framework, Apache Wicket, Dojo Toolkit
Dojo Toolkit
Dojo Toolkit is an open source modular JavaScript library designed to ease the rapid development of cross-platform, JavaScript/Ajax-based applications and web sites. It was started by Alex Russell, Dylan Schiemann, David Schontzler, and others in 2004 and is dual-licensed under the modified BSD...

, Hibernate
Hibernate (Java)
Hibernate is an object-relational mapping library for the Java language, providing a framework for mapping an object-oriented domain model to a traditional relational database...

), and open source implementations of standards and tools (e.g. Apache Tomcat
Apache Tomcat
Apache Tomcat is an open source web server and servlet container developed by the Apache Software Foundation...

, the GlassFish application server
GlassFish
GlassFish is an open source application server project started by Sun Microsystems for the Java EE platform and now sponsored by Oracle Corporation. The supported version is called Oracle GlassFish Server...

, the Mule
Mule (software)
Mule is a lightweight enterprise service bus and integration framework. It can handle services and applications using disparate transport and messaging technologies...

 and Apache ServiceMix
Apache ServiceMix
Apache ServiceMix is an enterprise-class open-source distributed enterprise service bus and service-oriented architecture . It was built from the ground up on the semantics and APIs of the Java Business Integration specification JSR 208 and released under the Apache License...

 Enterprise service bus
Enterprise service bus
An enterprise service bus is a software architecture model used for designing and implementing the interaction and communication between mutually interacting software applications in Service Oriented Architecture...

es).

Mascot

Duke is Java's mascot
Mascot
The term mascot – defined as a term for any person, animal, or object thought to bring luck – colloquially includes anything used to represent a group with a common public identity, such as a school, professional sports team, society, military unit, or brand name...

.

When Sun announced that Java SE and Java ME would be released under a free software license (the GNU General Public License
GNU General Public License
The GNU General Public License is the most widely used free software license, originally written by Richard Stallman for the GNU Project....

), they released the Duke graphics under the free BSD license
BSD licenses
BSD licenses are a family of permissive free software licenses. The original license was used for the Berkeley Software Distribution , a Unix-like operating system after which it is named....

 at the same time. Duke received an updated design in July 2011 that included a bigger nose, a jetpack, and blue wings.

Licensing

The source code for Sun's implementations of Java (that is the de-facto reference implementation) has been available for some time, but until recently the license terms severely restricted what could be done with it without signing (and generally paying for) a contract with Sun. As such these terms did not satisfy the requirements of either the Open Source Initiative
Open Source Initiative
The Open Source Initiative is an organization dedicated to promoting open source software.The organization was founded in February 1998, by Bruce Perens and Eric S. Raymond, prompted by Netscape Communications Corporation publishing the source code for its flagship Netscape Communicator product...

 or the Free Software Foundation
Free Software Foundation
The Free Software Foundation is a non-profit corporation founded by Richard Stallman on 4 October 1985 to support the free software movement, a copyleft-based movement which aims to promote the universal freedom to create, distribute and modify computer software...

 to be considered open source or free software, Sun Java was therefore a proprietary platform.

While several third-party projects (e.g. GNU Classpath
GNU Classpath
GNU Classpath is a project aiming to create a free software implementation of the standard class library for the Java programming language. Despite the massive size of the library to be created, the majority of the task is already done, including Swing, CORBA, and other major parts. The Classpath...

 and Apache Harmony
Apache Harmony
Apache Harmony was an open source, free Java implementation, developed by the Apache Software Foundation. It was announced in early May 2005 and on October 25, 2006, the Board of Directors voted to make Apache Harmony a top-level project...

) created free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 partial Java implementations, the large size of the Sun libraries combined with the use of clean room methods
Cleanroom Software Engineering
The Cleanroom software engineering process is a software development process intended to produce software with a certifiable level of reliability. The Cleanroom process was originally developed by Harlan Mills and several of his colleagues including Alan Hevner at IBM. The focus of the Cleanroom...

 meant that their implementations of the Java libraries (the compiler and VM are comparatively small and well defined) were incomplete and not fully compatible. These implementations also tended to be far less optimized than Sun's.

Free software

Sun
Sun Microsystems
Sun Microsystems, Inc. was a company that sold :computers, computer components, :computer software, and :information technology services. Sun was founded on February 24, 1982...

 announced in JavaOne
JavaOne
JavaOne is an annual conference inaugurated in 1996 by Sun Microsystems to discuss Java technologies, primarily among Java developers. JavaOne is held in San Francisco, California typically running from Monday to Thursday. Technical sessions on a variety of topics are held during the day. In the...

 2006 that Java would become free
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 and open source software, and on October 25, 2006, at the Oracle OpenWorld
Oracle OpenWorld
Oracle OpenWorld is an annual Oracle event for business decision-makers, IT management, and line-of-business end users. It is held in San Francisco, California; São Paulo, Brazil; and Shanghai, China. The world's largest conference for Oracle customers and technologists, Oracle OpenWorld San...

 conference, Jonathan I. Schwartz
Jonathan I. Schwartz
Jonathan Ian Schwartz is the co-founder and Chief Executive Officer of Picture of Health. He was formerly the President and CEO of Sun Microsystems prior to its acquisition by Oracle, and previously the founder and Chief Executive Officer of Lighthouse Design, Ltd., a software company focused on...

 said that the company was set to announce the release of the core Java Platform as free and open source software within 30 to 60 days.

Sun released the Java HotSpot virtual machine and compiler as free software under the GNU General Public License
GNU General Public License
The GNU General Public License is the most widely used free software license, originally written by Richard Stallman for the GNU Project....

 on November 13, 2006, with a promise that the rest of the JDK (that includes the JRE) would be placed under the GPL by March 2007 ("except for a few components that Sun does not have the right to publish in source form under the GPL"). According to Richard Stallman
Richard Stallman
Richard Matthew Stallman , often shortened to rms,"'Richard Stallman' is just my mundane name; you can call me 'rms'"|last= Stallman|first= Richard|date= N.D.|work=Richard Stallman's homepage...

, this would mean an end to the "Java trap". Mark Shuttleworth
Mark Shuttleworth
Mark Richard Shuttleworth is a South African entrepreneur who was the second self-funded space tourist. Shuttleworth founded Canonical Ltd. and as of 2010, provides leadership for the Ubuntu operating system...

 called the initial press announcement, "A real milestone for the free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 community".

Sun released the source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

 of the Class library
Java Class Library
The Java Class Library is a set of dynamically loadable libraries that Java applications can call at run time. Because the Java Platform is not dependent on any specific operating system, applications cannot rely on any of the existing libraries...

 under GPL
GNU General Public License
The GNU General Public License is the most widely used free software license, originally written by Richard Stallman for the GNU Project....

 on May 8, 2007, except some limited parts that were licensed by Sun from 3rd parties who did not want their code to be released under a free software and open-source license. Some of the encumbered parts turned out to be fairly key parts of the platform such as font rendering and 2D rasterising, but these were released as open-source later by Sun (see OpenJDK Class library).

Sun's goal is to replace the parts that remain proprietary and closed-source with alternative implementations and make the class library completely free and open source. A third party project called IcedTea
IcedTea
IcedTea is a build and integration project for OpenJDK launched by Red Hat in June 2007. The initial goal was to make the Java OpenJDK software which Sun Microsystems released as free software in 2007 usable without requiring any other software that is not free software and hence make it possible...

 has created a completely free and highly usable JDK by replacing encumbered code with either stubs or code from GNU Classpath
GNU Classpath
GNU Classpath is a project aiming to create a free software implementation of the standard class library for the Java programming language. Despite the massive size of the library to be created, the majority of the task is already done, including Swing, CORBA, and other major parts. The Classpath...

. IcedTea
IcedTea
IcedTea is a build and integration project for OpenJDK launched by Red Hat in June 2007. The initial goal was to make the Java OpenJDK software which Sun Microsystems released as free software in 2007 usable without requiring any other software that is not free software and hence make it possible...

 is currently available on Fedora 7 and Ubuntu
Ubuntu (operating system)
Ubuntu is a computer operating system based on the Debian Linux distribution and distributed as free and open source software. It is named after the Southern African philosophy of Ubuntu...

.

In June 2008, it was announced that IcedTea6
IcedTea
IcedTea is a build and integration project for OpenJDK launched by Red Hat in June 2007. The initial goal was to make the Java OpenJDK software which Sun Microsystems released as free software in 2007 usable without requiring any other software that is not free software and hence make it possible...

 (as the packaged version of OpenJDK on Fedora 9) has passed the Technology Compatibility Kit
Technology Compatibility Kit
A Technology Compatibility Kit is a suite of tests that at least nominally checks a particular alleged implementation of a Java Specification Request for compliance...

 tests and can claim to be a fully compatible Java 6 implementation.

Generics

When generics
Generic programming
In a broad definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters...

 were added to Java 5.0, there was already a large framework of classes (many of which were already deprecated
Deprecation
In the process of authoring computer software, its standards or documentation, deprecation is a status applied to software features to indicate that they should be avoided, typically because they have been superseded...

), so generics were chosen to be implemented using erasure to allow for migration compatibility and re-use of these existing classes. This limited the features that could be provided by this addition as compared to other languages.

Because generics were implemented using type erasure
Type erasure
In programming languages, type erasure refers to the compile-time process by which explicit type annotations are removed from a program, before it is executed at run-time. An operational semantics that does not require programs to be accompanied by types is called a type-erasure semantics, to be...

 the actual type of a template parameter is unavailable at runtime. Thus, the following operations are not possible in Java:

public class MyClass {
public static void myMethod(Object item) {
if (item instanceof E) { //Compiler error
...
}
E item2 = new E; //Compiler error
E[] iArray = new E[10]; //Compiler error
}
}

Unsigned integer types

Java lacks native unsigned integer
Integer (computer science)
In computer science, an integer is a datum of integral data type, a data type which represents some finite subset of the mathematical integers. Integral data types may be of different sizes and may or may not be allowed to contain negative values....

 types. Unsigned data is often generated from programs written in C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 and the lack of these types prevents direct data interchange between C and Java. Unsigned large numbers are also used in many numeric processing fields, including cryptography, which can make Java less convenient to use for these tasks.
Although it is possible to partially circumvent this problem with conversion code and using larger data types, it makes using Java cumbersome for handling unsigned data. While a 32-bit signed integer may be used to hold a 16-bit unsigned value with relative ease, a 32-bit unsigned value would require a 64-bit signed integer. Additionally, a 64-bit unsigned value cannot be stored using any integer type in Java because no type larger than 64 bits exists in the Java language. If abstracted using functions, function calls become necessary for many operations which are native to some other languages. Alternatively, it is possible to use Java's signed integers to emulate unsigned integers of the same size, but this requires detailed knowledge of complex bitwise operations.

Floating point arithmetic

While Java's floating point arithmetic is largely based on IEEE 754 (Standard for Binary Floating-Point Arithmetic), certain features are not supported even when using the strictfp
Strictfp
strictfp is a keyword in the Java programming language that restricts floating-point calculations to ensure portability. It was introduced into Java with the Java virtual machine version 1.2.-Basis:...

modifier, such as Exception Flags and Directed Roundings — capabilities mandated by IEEE Standard 754. Additionally, the extended precision floating-point types permitted in 754 and present in many processors are not permitted in Java.

Performance

In the early days of Java (before the HotSpot VM
HotSpot
HotSpot is a Java virtual machine for desktops and servers, maintained and distributed by Oracle Corporation. It features techniques such as just-in-time compilation and adaptive optimization designed to improve performance.-History:...

 was implemented in Java 1.3 in 2000) there were some criticisms of performance. As of 2011, these criticisms are generally unfounded - Java has been demonstrated to run at a speed comparable with optimised native code, and modern JVM implementations are regularly benchmarked as one of the fastest language platforms available - typically just a small factor slower than C/C++.

Java's performance
Java performance
The performance of a compiled Java program will depend on how smartly its particular tasks are going to be managed by the host JVM, and how well the JVM takes advantage of the features of the hardware and OS in doing so. Thus, any Java performance test or comparison has to always report the...

 has improved substantially since the early versions. Performance of JIT compilers relative to native compilers has in some optimized tests been shown to be quite similar.

Java bytecode
Java bytecode
Java bytecode is the form of instructions that the Java virtual machine executes. Each bytecode opcode is one byte in length, although some require parameters, resulting in some multi-byte instructions. Not all of the possible 256 opcodes are used. 51 are reserved for future use...

 can either be interpreted at run time by a virtual machine, or it can be compiled at load time or runtime into native code which runs directly on the computer's hardware. Interpretation is slower than native execution, and compilation at load time or runtime has an initial performance penalty for the compilation. Modern performance JVM implementations all use the compilation approach, so after the initial startup time the performance is equivalent to native code.

Security

Adobe Acrobat and Adobe Flash are among the most targeted software for security exploits. In 2010, targeting of Java security exploits increased significantly, resulting in Java becoming far more targeted than Acrobat or Flash.Microsoft publication This targeting appears to be tied to high numbers of computers with Java installed and the high percentage of computers that have not been updated with Java security updates.

Critics have suggested that updated versions of Java are not used because there is a lack of awareness by many users that Java is installed, there is a lack of awareness of many users of how to update Java, and (on corporate computers) many companies restrict software installation and are slow to deploy updates.

Among the suggestions made by critics is that users should consider uninstalling Java given the security risk and given the limited number of websites that require Java to be installed on the browser's computer. Browser extensions like NoScript
NoScript
NoScript is a free and open-source extension for Mozilla Firefox, SeaMonkey, and other Mozilla-based web browsers, created and actively maintained by Giorgio Maone, an Italian software developer and member of the Mozilla Security Group...

 allow one to enable Java selectively only for trusted sites.

See also

  • Common Intermediate Language
    Common Intermediate Language
    Common Intermediate Language is the lowest-level human-readable programming language defined by the Common Language Infrastructure specification and is used by the .NET Framework and Mono...

  • Comparison of the Java and .NET platforms
    Comparison of the Java and .NET platforms
    - Standardization :The two platforms, their programming libraries, their binary formats, and their runtime environments have largely been governed by very different means.The .NET platform as a whole has not been standardized...

  • Criticism of Java
    Criticism of Java
    A number of criticisms have been leveled at Java programming language for various design choices in the language and platform. Such criticisms include the implementation of generics, the handling of unsigned numbers, the implementation of floating-point arithmetic, and security vulnerabilities...

  • List of Java APIs
  • Java Logging Frameworks
    Java Logging Frameworks
    A Java logging framework is a computer data logging package for the Java platform.In software, logging refers to the recording of activity. Logging is a common issue for development teams. Several frameworks ease and standardize the process of logging for the Java platform...

  • Java performance
    Java performance
    The performance of a compiled Java program will depend on how smartly its particular tasks are going to be managed by the host JVM, and how well the JVM takes advantage of the features of the hardware and OS in doing so. Thus, any Java performance test or comparison has to always report the...

  • JavaFX
    JavaFX
    JavaFX is a software platform for creating and delivering rich Internet applications that can run across a wide variety of connected devices....

  • Jazelle
    Jazelle
    Jazelle DBX allows some ARM processors to execute Java bytecode in hardware as a third execution state alongside the existing ARM and Thumb modes. Jazelle functionality was specified in the ARMv5TEJ architecture and the first processor with Jazelle technology was the ARM926EJ-S...


External links

  • Official developer site
  • Presentation by James Gosling
    James Gosling
    James A. Gosling, OC is a computer scientist, best known as the father of the Java programming language.-Education and career:In 1977, Gosling received a B.Sc in Computer Science from the University of Calgary...

    about the origins of Java, from the JVM Languages Summit 2008
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK