In computing , cross-platform software (also called multi-platform software , platform-agnostic software , or platform-independent software ) is computer software that is designed to work in several computing platforms . Some cross-platform software requires a separate build for each platform, but some can be directly run on any platform without special preparation, being written in an interpreted language or compiled to portable bytecode for which the interpreters or run-time packages are common or standard components of all supported platforms.
86-539: Adobe AIR (also known as Adobe Integrated Runtime and codenamed Apollo ) is a cross-platform runtime system currently developed by Harman International , in collaboration with Adobe Inc. , for building desktop applications and mobile applications , programmed using Adobe Animate , ActionScript , and optionally Apache Flex . It was originally released in 2008. The runtime supports installable applications on Windows , macOS , and mobile operating systems, including Android , iOS , and BlackBerry Tablet OS . AIR
172-420: A fat binary . The use of different toolsets may not be enough to build a working executables for different platforms. In this case, programmers must port the source code to the new platform. For example, an application such as Firefox, which already runs on Windows on the x86 family, can be modified and re-built to run on Linux on the x86 (and potentially other architectures) as well. The multiple versions of
258-583: A JVM. Java software can be executed by a hardware-based Java processor . This is used mostly in embedded systems. Java code running in the JVM has access to OS-related services, like disk input/output (I/O) and network access, if the appropriate privileges are granted. The JVM makes the system calls on behalf of the Java application. This lets users to decide the appropriate protection level, depending on an access-control list (ACL). For example, disk and network access
344-442: A client/web-server architecture. The distinction between traditional and web applications is not always clear. Features, installation methods and architectures for web and traditional applications overlap and blur the distinction. Nevertheless, this simplifying distinction is a common and useful generalization. Traditional application software has been distributed as binary files, especially executable files . Executables only support
430-502: A database server, or the encrypted local store included with AIR. Developers can access additional functionality by building AIR Native Extensions , which can access full device functionality being programmed in the native language. On desktop platforms, AIR supports: On mobile platforms, AIR supports many mobile hardware features: In 2011, the addition of Stage3D allowed AIR apps access to GPUs for hardware acceleration. Several third-party frameworks have been developed to build upon
516-483: A game with the intention of release on the latest Nintendo and Sony game consoles. Should Disney license the game with Sony first, it may be required to release the game solely on Sony's console for a short time or indefinitely . Several developers have implemented ways to play games online while using different platforms. Psyonix , Epic Games , Microsoft , and Valve all possess technology that allows Xbox 360 and PlayStation 3 gamers to play with PC gamers, leaving
602-717: A lawsuit against Google shortly after that for using Java inside the Android SDK (see the Android section). On April 2, 2010, James Gosling resigned from Oracle . In January 2016, Oracle announced that Java run-time environments based on JDK 9 will discontinue the browser plugin. Java software runs on everything from laptops to data centers , game consoles to scientific supercomputers . Oracle (and others) highly recommend uninstalling outdated and unsupported versions of Java, due to unresolved security issues in older versions. There were five primary goals in creating
688-482: A number of other standard servlet classes available, for example for WebSocket communication. The Java servlet API has to some extent been superseded (but still used under the hood) by two standard Java technologies for web services: Typical implementations of these APIs on Application Servers or Servlet Containers use a standard servlet for handling all interactions with the HTTP requests and responses that delegate to
774-645: A particular platform—either the hardware, OS, or virtual machine (VM) it runs on. For example, the Java platform is a common VM platform which runs on many OSs and hardware types. A hardware platform can refer to an instruction set architecture . For example: ARM or the x86 architecture. These machines can run different operating systems. Smartphones and tablets generally run ARM architecture, these often run Android or iOS and other mobile operating systems . A software platform can be either an operating system (OS) or programming environment , though more commonly it
860-494: A separate app from the app market. AIR runs applications within a contained Flash Player instance. It runs web applications via WebKit rendering engine . Multiple instances of the browser can be started within a single AIR application, but JavaScript content executes with some security limitations. AIR does not provide direct access to native GUI elements such as navigation bars or controls. Native extensions can be used to access additional native resources. The AIR SDK
946-695: A shared codebase with the Flash Player rendering engine and ActionScript 3.0 as the primary programming language. Applications must specifically be built for AIR to use additional features provided, such as multi-touch , file system integration, native client extensions, integration with Taskbar or Dock , and access to accelerometer and GPS devices. HTML5 applications may run on the WebKit engine included in AIR. Notable applications built with Adobe AIR include eBay Desktop, Pandora One desktop, TweetDeck ,
SECTION 10
#17327804145721032-440: A small portion of code to which Sun did not hold the copyright. Sun's vice-president Rich Green said that Sun's ideal role with regard to Java was as an evangelist . Following Oracle Corporation 's acquisition of Sun Microsystems in 2009–10, Oracle has described itself as the steward of Java technology with a relentless commitment to fostering a community of participation and transparency. This did not prevent Oracle from filing
1118-443: A third. While this is straightforward, compared to developing for only one platform it can cost much more to pay a larger team or release products more slowly. It can also result in more bugs to be tracked and fixed. Another approach is to use software that hides the differences between the platforms. This abstraction layer insulates the application from the platform. Such applications are platform agnostic . Applications that run on
1204-527: A time-consuming task because different OSs have different application programming interfaces (API). Software written for one OS may not automatically work on all architectures that OS supports. Just because software is written in a popular programming language such as C or C++ , it does not mean it will run on all OSs that support that language—or even on different versions of the same OS. Web applications are typically described as cross-platform because, ideally, they are accessible from any web browser :
1290-469: A workaround for this problem. Tools such as the Page Object Model allow cross-platform tests to be scripted so that one test case covers multiple versions of an app. If different versions have similar user interfaces, all can be tested with one test case. Web applications are becoming increasingly popular but many computer users still use traditional application software which does not rely on
1376-700: Is IBM PowerVM Lx86 , which allows Linux/x86 applications to run unmodified on the Linux/Power OS. Example of cross-platform binary software: A script can be considered to be cross-platform if its interpreter is available on multiple platforms and the script only uses the facilities built into the language. For example, a script written in Python for a Unix-like system will likely run with little or no modification on Windows, because Python also runs on Windows; indeed there are many implementations (e.g. IronPython for .NET Framework ). The same goes for many of
1462-418: Is a combination of both. An exception is Java , which uses an OS-independent virtual machine (VM) to execute Java bytecode . Some software platforms are: The Java language is typically compiled to run on a VM that is part of the Java platform. The Java virtual machine (Java VM, JVM) is a CPU implemented in software, which runs all Java code. This enables the same code to run on all systems that implement
1548-632: Is a runtime environment that allows Adobe Animate content and ActionScript 3.0 coders to construct applications and video games that run as a stand-alone executable and behave similarly to a native application on supported platforms. An HTML5 application used in a browser does not require installation, while AIR applications require installation from an installer file (Windows and OS X) or the appropriate App Store (iOS and Android). AIR applications have unrestricted access to local storage and file systems , while browser-based applications only have access to individual files selected by users. AIR internally uses
1634-516: Is a term that can also apply to video games released on a range of video game consoles . Examples of cross-platform games include: Miner 2049er , Tomb Raider: Legend , FIFA series , NHL series and Minecraft . Each has been released across a variety of gaming platforms, such as the Wii , PlayStation 3 , Xbox 360 , personal computers , and mobile devices . Some platforms are harder to write for than others, requiring more time to develop
1720-576: Is actually two compilers in one; and with GraalVM (included in e.g. Java 11, but removed as of Java 16) allowing tiered compilation . Java itself is platform-independent and is adapted to the particular platform it is to run on by a Java virtual machine (JVM), which translates the Java bytecode into the platform's machine language. Programs written in Java have a reputation for being slower and requiring more memory than those written in C++ . However, Java programs' execution speed improved significantly with
1806-606: Is an integrated collection of stylable graphical user interface , data manipulation and networking components, and applications built upon it are known as "Flex" applications. Flex GUIs are defined in MXML, similar to how Android and Microsoft Visual Studio define GUIs; however, Flex does not give access to native GUI components. AIR applications built without the Flex framework allow greater flexibility and performance, and are known as "pure ActionScript" applications. Video games built on
SECTION 20
#17327804145721892-480: Is available as a free standalone download for software developers to make AIR applications. SDK users do not need to install any commercial software to use the SDK, although several options are available. AIR apps can be compiled from the command line using the AIR compiler included in the SDK; the compiler can also be called from an IDE to eliminate the need for the command line. AIR can also be used with Adobe Flex . Flex
1978-430: Is available on Windows, macOS (both PowerPC and x86 through what Apple Inc. calls a Universal binary ), Linux, and BSD on multiple computer architectures. The four platforms (in this case, Windows, macOS, Linux, and BSD) are separate executable distributions, although they come largely from the same source code . In rare cases, executable code built for several platforms is combined into a single executable file called
2064-411: Is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let programmers write once, run anywhere ( WORA ), meaning that compiled Java code can run on all platforms that support Java without the need to recompile. Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of
2150-409: Is implicitly allocated on the stack or explicitly allocated and deallocated from the heap . In the latter case, the responsibility of managing memory resides with the programmer. If the program does not deallocate an object, a memory leak occurs. If the program attempts to access or deallocate memory that has already been deallocated, the result is undefined and difficult to predict, and the program
2236-658: Is installed by a user". In May 2014, Adobe claimed that over 100,000 unique applications were built on AIR, and over 1 billion installations of the same were logged from users across the world. Adobe AIR, version 32, contains Adobe Flash Player 32, and is available for Windows 7 and later, as well as OS X 10.9 and later. Desktop Linux distributions were available until June 2011 with version 2.6, which ended Linux support. Adobe AIR applications can be published as native phone applications on certain mobile operating systems, such as Android (ARM Cortex-A8 and above) and Apple iOS. In May 2017, Adobe stopped releasing AIR for Android, and
2322-626: Is insufficient free memory on the heap to allocate a new object; this can cause a program to stall momentarily. Explicit memory management is not possible in Java. Java does not support C/C++ style pointer arithmetic , where object addresses can be arithmetically manipulated (e.g. by adding or subtracting an offset). This allows the garbage collector to relocate referenced objects and ensures type safety and security. As in C++ and some other object-oriented languages, variables of Java's primitive data types are either stored directly in fields (for objects) or on
2408-399: Is likely to become unstable or crash. This can be partially remedied by the use of smart pointers , but these add overhead and complexity. Garbage collection does not prevent logical memory leaks, i.e. those where the memory is still referenced but never used. Garbage collection may happen at any time. Ideally, it will occur when a program is idle. It is guaranteed to be triggered if there
2494-420: Is no longer needed, typically when objects that are no longer needed are stored in containers that are still in use. If methods for a non-existent object are called, a null pointer exception is thrown. One of the ideas behind Java's automatic memory management model is that programmers can be spared the burden of having to perform manual memory management. In some languages, memory for the creation of objects
2580-448: Is separation of functionality, which disables functionality not supported by browsers or OSs, while still delivering a complete application to the user. (See also: Separation of concerns .) This technique is used in web development where interpreted code (as in scripting languages) can query the platform it is running on to execute different blocks conditionally. Third-party libraries attempt to simplify cross-platform capability by hiding
2666-538: Is supported for interfaces . Java uses comments similar to those of C++. There are three different styles of comments: a single line style marked with two slashes ( // ), a multiple line style opened with /* and closed with */ , and the Javadoc commenting style opened with /** and closed with */ . The Javadoc style of commenting allows the user to run the Javadoc executable to create documentation for
Adobe AIR - Misplaced Pages Continue
2752-451: Is the latest version (Java 22, and 20 are no longer maintained). Java 8, 11, 17, and 21 are previous LTS versions still officially supported. James Gosling , Mike Sheridan, and Patrick Naughton initiated the Java language project in June 1991. Java was originally designed for interactive television, but it was too advanced for the digital cable television industry at the time. The language
2838-547: Is the practice of deliberately writing software to work on more than one platform. There are different ways to write a cross-platform application. One approach is to create multiple versions of the same software in different source trees —in other words, the Microsoft Windows version of an application might have one set of source code files and the Macintosh version another, while a FOSS *nix system might have
2924-421: Is the premium tool for Flex application development, since it includes an integrated drag-and-drop user interface builder, not found in competing tools like FlashDevelop. Adobe provides for AIR, HTML5 and JavaScript development with Adobe Dreamweaver CS5, although any other HTML editor or text editor can be used. AIR can run a subset of JavaScript, with no ability to dynamically execute code when running in
3010-411: Is used with this technique. Cross-platform applications need much more integration testing . Some web browsers prohibit installation of different versions on the same machine. There are several approaches used to target multiple platforms, but all of them result in software that requires substantial manual effort for testing and maintenance. Techniques such as full virtualization are sometimes used as
3096-764: Is usually enabled for desktop applications, but not for browser-based applets . The Java Native Interface (JNI) can also be used to access OS-specific functions, with a loss of portability. Currently, Java Standard Edition software can run on Microsoft Windows, macOS, several Unix-like OSs, and several real-time operating systems for embedded devices. For mobile applications, browser plugins are used for Windows and Mac based devices, and Android has built-in support for Java. There are also subsets of Java, such as Java Card or Java Platform, Micro Edition , designed for resource-constrained devices. For software to be considered cross-platform, it must function on more than one computer architecture or OS. Developing such software can be
3182-431: Is written inside classes, and every data item is an object, with the exception of the primitive data types, (i.e. integers, floating-point numbers, boolean values , and characters), which are not objects for performance reasons. Java reuses some popular aspects of C++ (such as the printf method). Unlike C++, Java does not support operator overloading or multiple inheritance for classes, though multiple inheritance
3268-593: The ConcurrentMaps and other multi-core collections, and it was improved further with Java 1.6. Some platforms offer direct hardware support for Java; there are micro controllers that can run Java bytecode in hardware instead of a software Java virtual machine, and some ARM -based processors could have hardware support for executing Java bytecode through their Jazelle option, though support has mostly been dropped in current implementations of ARM. Java uses an automatic garbage collector to manage memory in
3354-418: The object lifecycle . The programmer determines when objects are created, and the Java runtime is responsible for recovering the memory once objects are no longer in use. Once no references to an object remain, the unreachable memory becomes eligible to be freed automatically by the garbage collector. Something similar to a memory leak may still occur if a programmer's code holds a reference to an object that
3440-422: The open-source scripting languages . Unlike binary executable files, the same script can be used on all computers that have software to interpret the script. This is because the script is generally stored in plain text in a text file . There may be some trivial issues, such as the representation of a new line character . Some popular cross-platform scripting languages are: Cross-platform or multi-platform
3526-516: The stack (for methods) rather than on the heap, as is commonly true for non-primitive data types (but see escape analysis ). This was a conscious decision by Java's designers for performance reasons. Java contains multiple types of garbage collectors. Since Java 9, HotSpot uses the Garbage First Garbage Collector (G1GC) as the default. However, there are also several other garbage collectors that can be used to manage
Adobe AIR - Misplaced Pages Continue
3612-545: The AIR platform are typically pure-Actionscript projects. Various open-source component frameworks are available for pure ActionScript projects, such as MadComponents , that provide UI Components at significantly smaller SWF file sizes. Adobe distributes three commercial software products for developing of AIR applications in ActionScript: Third-party development environments that target the AIR runtime are also available, including: Adobe Flash Builder
3698-409: The AIR runtime. Applications packaged with the AIR runtime are larger in file size, and are known as "captive runtime" applications. If the runtime is not embedded in the app, it must be installed separately. In January 2009, Adobe claimed that there were over 100 million installations of Adobe AIR worldwide, and that "the majority of AIR runtime installations occur at the time the first AIR application
3784-583: The JVM are built this way. Some applications mix various methods of cross-platform programming to create the final application. An example is the Firefox web browser, which uses abstraction to build some of the lower-level components, with separate source subtrees for implementing platform-specific features (like the GUI), and the implementation of more than one scripting language to ease software portability . Firefox implements XUL , CSS and JavaScript for extending
3870-834: The Java language, as part of J2SE 5.0. Prior to the introduction of generics, each variable declaration had to be of a specific type. For container classes, for example, this is a problem because there is no easy way to create a container that accepts only specific types of objects. Either the container operates on all subtypes of a class or interface, usually Object , or a different container class has to be created for each contained class. Generics allow compile-time type checking without having to create many container classes, each containing almost identical code. In addition to enabling more efficient code, certain runtime exceptions are prevented from occurring, by issuing compile-time errors. If Java prevented all runtime type errors ( ClassCastException s) from occurring, it would be type safe . In 2016,
3956-950: The Java language: As of November 2024 , Java 8, 11, 17, and 21 are supported as long-term support (LTS) versions, with Java 25, releasing in September 2025, as the next scheduled LTS version. Oracle released the last zero-cost public update for the legacy version Java 8 LTS in January 2019 for commercial use, although it will otherwise still support Java 8 with public updates for personal use indefinitely. Other vendors such as Adoptium continue to offer free builds of OpenJDK's long-term support (LTS) versions. These builds may include additional security patches and bug fixes. Major release versions of Java, along with their release dates: Sun has defined and supports four editions of Java targeting different application environments and segmented many of its APIs so that they belong to one of
4042-440: The Java platform must run similarly on any combination of hardware and operating system with adequate run time support. This is achieved by compiling the Java language code to an intermediate representation called Java bytecode , instead of directly to architecture-specific machine code . Java bytecode instructions are analogous to machine code, but they are intended to be executed by a virtual machine (VM) written specifically for
4128-635: The ability to run Java applets within web pages, and Java quickly became popular. The Java 1.0 compiler was re-written in Java by Arthur van Hoff to comply strictly with the Java 1.0 language specification. With the advent of Java 2 (released initially as J2SE 1.2 in December 1998 – 1999), new versions had multiple configurations built for different types of platforms. J2EE included technologies and APIs for enterprise applications typically run in server environments, while J2ME featured APIs optimized for mobile applications. The desktop version
4214-485: The app was eventually removed from the Play Store in September 2018, but it can still be downloaded through their website. After Adobe's transition of AIR to Harman, they resumed support for Android and the latest version is only available there. The following table explains to what extent Adobe AIR can run on various mobile operating systems : Option 2: The runtime is not included with the app, and must installed as
4300-578: The application sandbox. According to Adobe, this restriction is designed to prevent malicious remote content from attacking a user's system. Because of this restriction, JavaScript frameworks that make use of dynamic JavaScript functions like eval() were not initially compatible with AIR. However, several frameworks including Dojo Toolkit , jQuery , and ExtJS were updated to run in AIR's application sandbox. Some frameworks like MooTools were already compatible. Dreamweaver CS4/CS3 requires an additional extension to compile AIR applications, as does Flash CS3 in
4386-486: The browser is the platform. Web applications generally employ a client–server model , but vary widely in complexity and functionality. It can be hard to reconcile the desire for features with the need for compatibility. Basic web applications perform all or most processing from a stateless server , and pass the result to the client web browser. All user interaction with the application consists of simple exchanges of data requests and server responses. This type of application
SECTION 50
#17327804145724472-473: The browser, in addition to classic Netscape -style browser plugins. Much of the browser itself is written in XUL, CSS, and JavaScript. There are many tools available to help the process of cross-platform programming: There are many challenges when developing cross-platform software. Java (programming language) Java is a high-level , class-based , object-oriented programming language that
4558-449: The code may be stored as separate codebases, or merged into one codebase. An alternative to porting is cross-platform virtualization , where applications compiled for one platform can run on another without modification of the source code or binaries. As an example, Apple's Rosetta , which is built into Intel -based Macintosh computers, runs applications compiled for the previous generation of Macs that used PowerPC CPUs. Another example
4644-470: The code, but can be worthwhile where the amount of platform-specific code is high. This strategy relies on having one codebase that may be compiled to multiple platform-specific formats. One technique is conditional compilation . With this technique, code that is common to all platforms is not repeated. Blocks of code that are only relevant to certain platforms are made conditional, so that they are only interpreted or compiled when needed. Another technique
4730-447: The complexities of client differentiation behind a single, unified API, at the expense of vendor lock-in . Responsive web design (RWD) is a Web design approach aimed at crafting the visual layout of sites to provide an optimal viewing experience—easy reading and navigation with a minimum of resizing, panning, and scrolling—across a wide range of devices, from mobile phones to desktop computer monitors. Little or no platform-specific code
4816-526: The decision of which platform to use to consumers. The first game to allow this level of interactivity between PC and console games (Dreamcast with specially produced keyboard and mouse) was Quake 3 . Games that feature cross-platform online play include Rocket League , Final Fantasy XIV , Street Fighter V , Killer Instinct , Paragon and Fable Fortune , and Minecraft with its Better Together update on Windows 10 , VR editions, Pocket Edition and Xbox One . Cross-platform programming
4902-522: The end of 2020, as support will be managed by Harman. Using AIR, developers can access functionality including text , vector graphics , raster graphics , video , audio , camera , and microphone capability. AIR also includes additional features such as file system integration, native client extensions, desktop integration and access to connected devices. AIR enables applications to work with data in different ways, including using local files, local SQLite databases (for which AIR has built-in support),
4988-433: The form of an update. Cross-platform software For example, a cross-platform application may run on Linux , macOS and Microsoft Windows . Cross-platform software may run on many platforms, or as few as two. Some frameworks for cross-platform development are Codename One , ArkUI-X, Kivy , Qt , GTK , Flutter , NativeScript , Xamarin , Apache Cordova , Ionic , and React Native . Platform can refer to
5074-822: The former Adobe Media Player , Angry Birds , and Machinarium , among other multimedia and task management applications. According to Adobe, over 100,000 unique applications have been built on AIR, and over 1 billion installations of the same were logged from users across the world, as of May 2014. Adobe AIR was voted as the Best Mobile Application Development product at the Consumer Electronics Show for two consecutive years (CES 2014 and CES 2015). In June 2019, Adobe announced it would begin transitioning ongoing support and development of Adobe AIR to Harman . Adobe will continue to provide support for versions 32 and earlier until
5160-813: The functionality of Stage3D, including the Starling Framework and Away3D . These frameworks are also compatible with AIR, and provide vital performance improvements to AIR apps published for mobile devices. AIR apps can be augmented in functionality with the usage of AIR Native Extensions (ANEs). Native extensions are plug-in code libraries that contain native code wrapped with an ActionScript API, allowing developers to access native features not otherwise usable in AIR, such as Apple Game Center or Google Cloud Messaging. Native extensions may be developed by anyone using publicly available tools; some are distributed for free or even as open source, while others are sold commercially. Native extensions may be programmed in
5246-586: The generated servlet creates the response. Swing is a graphical user interface library for the Java SE platform. It is possible to specify a different look and feel through the pluggable look and feel system of Swing. Clones of Windows , GTK+ , and Motif are supplied by Sun. Apple also provides an Aqua look and feel for macOS . Where prior implementations of these looks and feels may have been considered lacking, Swing in Java SE 6 addresses this problem by using more native GUI widget drawing routines of
SECTION 60
#17327804145725332-596: The heap, such as the Z Garbage Collector (ZGC) introduced in Java 11, and Shenandoah GC, introduced in Java 12 but unavailable in Oracle-produced OpenJDK builds. Shenandoah is instead available in third-party builds of OpenJDK, such as Eclipse Temurin . For most applications in Java, G1GC is sufficient. In prior versions of Java, such as Java 8, the Parallel Garbage Collector was used as the default garbage collector. Having solved
5418-658: The host hardware. End-users commonly use a Java Runtime Environment (JRE) installed on their device for standalone Java applications or a web browser for Java applets . Standard libraries provide a generic way to access host-specific features such as graphics, threading , and networking . The use of universal bytecode makes porting simple. However, the overhead of interpreting bytecode into machine instructions made interpreted programs almost always run more slowly than native executables . Just-in-time (JIT) compilers that compile byte-codes to machine code during runtime were introduced from an early stage. Java's Hotspot compiler
5504-556: The implementation of floating-point arithmetic, and a history of security vulnerabilities in the primary Java VM implementation HotSpot . Developers have criticized the complexity and verbosity of the Java Persistence API (JPA), a standard part of Java EE. This has led to increased adoption of higher-level abstractions like Spring Data JPA, which aims to simplify database operations and reduce boilerplate code. The growing popularity of such frameworks suggests limitations in
5590-537: The introduction of just-in-time compilation in 1997/1998 for Java 1.1 , the addition of language features supporting better code analysis (such as inner classes, the StringBuilder class, optional assertions, etc.), and optimizations in the Java virtual machine, such as HotSpot becoming Sun's default JVM in 2000. With Java 1.5, the performance was improved with the addition of the java.util.concurrent package, including lock-free implementations of
5676-455: The memory management problem does not relieve the programmer of the burden of handling properly other kinds of resources, like network or database connections, file handles, etc., especially in the presence of exceptions. The syntax of Java is largely influenced by C++ and C . Unlike C++, which combines the syntax for structured, generic, and object-oriented programming, Java was built almost exclusively as an object-oriented language. All code
5762-454: The more recent versions of popular web browsers. These features include Ajax , JavaScript , Dynamic HTML , SVG , and other components of rich web applications . Because of the competing interests of compatibility and functionality, numerous design strategies have emerged. Many software systems use a layered architecture where platform-dependent code is restricted to the upper- and lowermost layers. Graceful degradation attempts to provide
5848-441: The native language on each platform, allowing access to the full set of platform APIs provided by the developer. ( C++ for Windows, Java and C++ for Android, Objective-C for iOS). AIR is a cross-platform technology and AIR applications can be repackaged with few or no changes for many popular desktop and mobile platforms. Different installation options exist for each platform. AIR applications may be published with or without
5934-542: The platform they were built for—which means that a single cross-platform executable could be very bloated with code that never executes on a particular platform. Instead, generally there is a selection of executables, each built for one platform. For software that is distributed as a binary executable, such as that written in C or C++, there must be a software build for each platform, using a toolset that translates—transcompiles—a single codebase into multiple binary executables. For example, Firefox , an open-source web browser,
6020-496: The platforms. The platforms are: The classes in the Java APIs are organized into separate groups called packages . Each package contains a set of related interfaces , classes, subpackages and exceptions . Sun also provided an edition called Personal Java that has been superseded by later, standards-based Java ME configuration-profile pairings. One design goal of Java is portability , which means that programs written for
6106-451: The program and can be read by some integrated development environments (IDEs) such as Eclipse to allow developers to access documentation within the IDE. The following is a simple example of a "Hello, World!" program that writes a message to the standard output : Java applets are programs embedded in other applications, mainly in web pages displayed in web browsers. The Java applet API
6192-497: The same or similar functionality to all users and platforms, while diminishing that functionality to a least common denominator for more limited client browsers. For example, a user attempting to use a limited-feature browser to access Gmail may notice that Gmail switches to basic mode, with reduced functionality but still of use. Some software is maintained in distinct codebases for different (hardware and OS) platforms, with equivalent functionality. This requires more effort to maintain
6278-527: The selling of licenses for specialized products such as the Java Enterprise System. On November 13, 2006, Sun released much of its Java virtual machine (JVM) as free and open-source software (FOSS), under the terms of the GPL-2.0-only license. On May 8, 2007, Sun finished the process, making all of its JVM's core code available under free software /open-source distribution terms, aside from
6364-555: The specifications of the Java Community Process , Sun had relicensed most of its Java technologies under the GPL-2.0-only license. Oracle offers its own HotSpot Java Virtual Machine, however the official reference implementation is the OpenJDK JVM which is free open-source software and used by most developers and is the default JVM for almost all Linux distributions. As of September 2024 , Java 23
6450-468: The standard JPA implementation's ease-of-use for modern Java development. The Java Class Library is the standard library , developed to support application development in Java. It is controlled by Oracle in cooperation with others through the Java Community Process program. Companies or individuals participating in this process can influence the design and development of the APIs. This process has been
6536-447: The type of processor (CPU) or other hardware on which an operating system (OS) or application runs, the type of OS, or a combination of the two. An example of a common platform is Android which runs on the ARM architecture family . Other well-known platforms are Linux / Unix , macOS and Windows , these are all cross-platform. Applications can be written to depend on the features of
6622-409: The type system of Java was proven unsound in that it is possible to use generics to construct classes and methods that allow assignment of an instance one class to a variable of another unrelated class. Such code is accepted by the compiler, but fails at run time with a class cast exception. Criticisms directed at Java include the implementation of generics, speed, the handling of unsigned numbers,
6708-434: The underlying computer architecture . The syntax of Java is similar to C and C++ , but has fewer low-level facilities than either of them. The Java runtime provides dynamic capabilities (such as reflection and runtime code modification) that are typically not available in traditional compiled languages. Java gained popularity shortly after its release, and has been a very popular programming language since then. Java
6794-571: The underlying platforms. JavaFX is a software platform for creating and delivering desktop applications , as well as rich web applications that can run across a wide variety of devices. JavaFX is intended to replace Swing as the standard GUI library for Java SE , but since JDK 11 JavaFX has not been in the core JDK and instead in a separate module. JavaFX has support for desktop computers and web browsers on Microsoft Windows , Linux , and macOS . JavaFX does not have support for native OS look and feels. In 2004, generics were added to
6880-497: The video game to the same standard. To offset this, a video game may be released on a few platforms first, then later on others. Typically, this happens when a new gaming system is released, because video game developers need to acquaint themselves with its hardware and software. Some games may not be cross-platform because of licensing agreements between developers and video game console manufacturers that limit development to one particular console. As an example, Disney could create
6966-417: The web service methods for the actual business logic. JavaServer Pages ( JSP ) are server-side Java EE components that generate responses, typically HTML pages, to HTTP requests from clients . JSPs embed Java code in an HTML page by using the special delimiters <% and %> . A JSP is compiled to a Java servlet , a Java application in its own right, the first time it is accessed. After that,
7052-440: Was deprecated with the release of Java 9 in 2017. Java servlet technology provides Web developers with a simple, consistent mechanism for extending the functionality of a Web server and for accessing existing business systems. Servlets are server-side Java EE components that generate responses to requests from clients . Most of the time, this means generating HTML pages in response to HTTP requests, although there are
7138-665: Was initially called Oak after an oak tree that stood outside Gosling's office. Later the project went by the name Green and was finally renamed Java , from Java coffee , a type of coffee from Indonesia . Gosling designed Java with a C / C++ -style syntax that system and application programmers would find familiar. Sun Microsystems released the first public implementation as Java 1.0 in 1996. It promised write once, run anywhere (WORA) functionality, providing no-cost run-times on popular platforms . Fairly secure and featuring configurable security, it allowed network- and file-access restrictions. Major web browsers soon incorporated
7224-689: Was renamed J2SE. In 2006, for marketing purposes, Sun renamed new J2 versions as Java EE , Java ME , and Java SE , respectively. In 1997, Sun Microsystems approached the ISO/IEC JTC 1 standards body and later the Ecma International to formalize Java, but it soon withdrew from the process. Java remains a de facto standard , controlled through the Java Community Process . At one time, Sun made most of its Java implementations available without charge, despite their proprietary software status. Sun generated revenue from Java through
7310-565: Was the norm in the early phases of World Wide Web application development. Such applications follow a simple transaction model, identical to that of serving static web pages . Today, they are still relatively common, especially where cross-platform compatibility and simplicity are deemed more critical than advanced functionality. Prominent examples of advanced web applications include the Web interface to Gmail and Google Maps . Such applications routinely depend on additional features found only in
7396-625: Was the third most popular programming language in 2022 according to GitHub . Although still widely popular, there has been a gradual decline in use of Java in recent years with other languages using JVM gaining popularity. Java was originally developed by James Gosling at Sun Microsystems . It was released in May 1995 as a core component of Sun's Java platform . The original and reference implementation Java compilers , virtual machines, and class libraries were originally released by Sun under proprietary licenses . As of May 2007, in compliance with
#571428