Java (computer), in computer science, object-oriented programming language introduced in 1995 by Sun Microsystems, Inc. Java facilitates the distribution of both data and small application programs, called applets, over the Internet, aided by its object-oriented programming style. Java applications do not interact directly with a computer’s central processing unit (CPU) or operating system and are therefore platform independent, meaning that they can run on any type of personal computer, workstation, or mainframe computer. This cross-platform capability, referred to as “write once, run everywhere”, has caught the attention of many software developers and users. With Java, software developers can write applications that will run on otherwise incompatible operating systems such as Windows, the Apple Computer operating system, OS/2, or UNIX.
To use a Java applet via the World Wide Web (WWW or Web)—the system of software and protocols that allows multimedia documents to be viewed on the Internet—a user must have a Java-compatible browser, such as Netscape Navigator from Netscape Communications Corporation, Internet Explorer from Microsoft Corporation, or HotJava from Sun Microsystems. A browser is a software program that allows the user to view text, photographs, graphics, illustrations, and animations on the Web. Java applets achieve platform independence through the use of a virtual machine, a special program within the browser software that interprets the bytecode, the code that the applet is written in, for the computer’s CPU. The virtual machine is able to translate the platform-independent bytecode into the platform-dependent machine code that a specific computer’s CPU understands.
Applications written in Java are usually embedded in Web pages, or documents, and can be run by clicking on them with a mouse. When an applet is run from a Web page, a copy of the application program is sent to the user’s computer over the Internet and stored in the computer’s main memory. The advantage of this method is that once an applet has been downloaded, it can be interacted with in real time by the user. This is in contrast to other programming languages used to write Web documents and interactive programs, in which the document or program is run from the server computer. The problem with running software from a server is that it generally cannot be run in real time owing to limitations in network or modem bandwidth (the amount of data that can be transmitted in a certain amount of time). Java therefore enables a far greater degree of integration between computers over the Internet than hitherto possible, as well as new patterns of software distribution and use, with downloaded applets replacing large application programs.
Java grew out of a research project at Sun Microsystems in the early 1990s that focused on controlling different consumer electronics devices using the same software. The original version of Java, called Oak, needed to be simple enough to function with the modest microprocessors found in such consumer devices. Following the introduction by the National Center for Supercomputing Applications (NCSA) of the Mosaic browser in 1993, Oak was recast by Sun Microsystems developers. In 1994 Sun Microsystems released a Java-compatible Internet browser, called HotJava, that was designed to read and execute Java applets on the Web. Sun Microsystems licensed Java to Netscape Communications in November 1995, and its Navigator browser supports Java applications. Microsoft also licensed Java, in 1996, for its Internet Explorer browser. Microsoft developed a programming language, called Visual J++, to integrate Java, through its ActiveX technology, with its browser. Visual J++ is optimized for the Windows operating system. (Sun has frequently complained that Microsoft’s policies towards Java have been an attempt to dilute its cross-platform capabilities, and in October 1997 filed a complaint with a California court alleging that the version of Java shipped with Microsoft’s latest browser, Internet Explorer 4.0, was incompatible with other versions.) Various other Web browsers are also capable of supporting Java applications and applets.
JavaSoft, a division of Sun Microsystems with responsibility for Java and its business development, has created JavaOS, a compact operating system for use on its own JavaStation network computers, as well as in cellular telephones, pagers, Personal Digital Assistant.