Comparison of the Java and .NET platforms
   HOME

TheInfoList



OR:

Comparison of the Java and .NET platforms.


Legal issues


.NET

The Mono project aims to avoid infringing on any patents or copyrights and, to the extent that they are successful, the project can be safely distributed and used under the
GPL The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the four freedoms to run, study, share, and modify the software. The license was the first copyleft for general u ...
. On November 2, 2006, Microsoft and Novell announced a joint agreement whereby Microsoft promised not to sue Novell or its customers for patent infringement. According to a statement on the blog of Mono project leader
Miguel de Icaza Miguel de Icaza (born November 23, 1972) is a Mexican programmer, best known for starting the GNOME, Mono, and Xamarin projects. Biography Early years De Icaza was born in Mexico City and studied Mathematics at the National Autonomous University ...
, this agreement only extends to Mono for Novell developers and users. Because of the possible threat of Microsoft patents, the FSF recommends that people avoid creating software that depends on Mono or C#. The Microsoft–Novell agreement was criticized by some in the open source community because it violates the principles of giving equal rights to all users of a particular program (see Agreement with Microsoft and Mono and Microsoft's patents). In response to the Microsoft–Novell agreement, the
Free Software Foundation The Free Software Foundation (FSF) is a 501(c)(3) non-profit organization founded by Richard Stallman on October 4, 1985, to support the free software movement, with the organization's preference for software being distributed under copyleft (" ...
revised its
GNU General Public License The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the four freedoms to run, study, share, and modify the software. The license was the first copyleft for general ...
to close the loophole used by Microsoft and Novell to bypass the GPL's very strong and protective provisions on patent deals (considered by Microsoft as restrictive).Microsoft takes on the free world.
/ref> The FSF also stated that by selling coupons for Novell's Linux software, the mechanism by which Microsoft circumvented the GNU license, it considers Microsoft to be a Linux vendor, and thereby subject to the full terms and conditions laid out in the GPL. The .NET landscape started to change in 2013, when Microsoft decided to open-source many of its core .NET technologies under Apache License,Microsoft still open sources more technologies than many think
/ref> with even more donated to newly formed
.NET Foundation The .NET Foundation is an organization incorporated on March 31, 2014, by Microsoft to improve open-source software development and collaboration around the .NET Framework. It was launched at the annual Build 2014 conference held by Microsoft. T ...
in 2014.Microsoft open sources more of its .NET technologies
/ref> Open-sourced technologies include ASP.NET MVC,
Entity Framework Entity Framework (EF) is an open source object–relational mapping (ORM) framework for ADO.NET. It was originally shipped as an integral part of .NET Framework, however starting with Entity Framework version 6.0 it has been delivered separately ...
, Managed Extensibility Framework, Roslyn compiler-as-a-service infrastructure (together with C# and
Visual Basic .NET Visual Basic, originally called Visual Basic .NET (VB.NET), is a multi-paradigm, object-oriented programming language, implemented on .NET, Mono, and the .NET Framework. Microsoft launched VB.NET in 2002 as the successor to its original Visua ...
compilers), F# functional-first language compiler,The F# Software Foundation
/ref> and many more..NET Foundation Projects
/ref> Microsoft and
Xamarin Xamarin is a Microsoft-owned San Francisco-based software company founded in May 2011 by the engineers that created Mono, Xamarin.Android (formerly Mono for Android) and Xamarin.iOS (formerly MonoTouch), which are cross-platform implementatio ...
announced collaboration, with the intent to increase cross-platform availability of .NET on Mac OS, Linux, and mobile devices.Xamarin partners with Microsoft to deliver .NET everywhere
/ref> Microsoft released in June 2016 .NET Core 1.0, which is an open-source cross-platform environment and a lean version of the pure Windows implementation.


Traditional computer applications


Desktop applications

Although Java's AWT (
Abstract Window Toolkit The Abstract Window Toolkit (AWT) is Java's original platform-dependent windowing, graphics, and user-interface widget toolkit, preceding Swing. The AWT is part of the Java Foundation Classes (JFC) — the standard API for providing a graphi ...
) and Swing libraries are not shy of features, Java has struggled to establish a foothold in the desktop market. Sun Microsystems was also slow, in the eyes of some, to promote Java to developers and end-users in a way that makes it an appealing choice for desktop software. Even technologies such as
Java Web Start In computing, Java Web Start (also known as JavaWS, javaws or JAWS) is a deprecated framework developed by Sun Microsystems (now Oracle) that allows users to start application software for the Java Platform directly from the Internet using a web b ...
, which have few parallels within rival languages and platforms, have barely been promoted. The release of Java version 6.0 on December 11, 2006, saw a renewed focus on the desktop market with an extensive set of new tools for closer integration with the desktop. At the 2007
JavaOne __NOTOC__ JavaOne is an annual conference first organized in 1996 by Sun Microsystems to discuss Java technologies, primarily among Java developers. It was held in San Francisco, California, typically running from a Monday to Thursday in summer ...
conference Sun made further desktop related announcements, including a new language aimed at taking on
Adobe Flash Adobe Flash (formerly Macromedia Flash and FutureSplash) is a multimedia software platform used for production of animations, rich web applications, desktop applications, mobile apps, mobile games, and embedded web browser video players. Fla ...
(
JavaFX 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 has support for desktop computers and web browsers on Microsoft Windows, Linu ...
), a new lightweight way of downloading the JRE that sees the initial footprint reduced to under 2  Mb, and a renewed focus on
multimedia Multimedia is a form of communication that uses a combination of different content forms such as text, audio, images, animations, or video into a single interactive presentation, in contrast to tradit ...
libraries. An alternative to AWT and Swing is the
Standard Widget Toolkit The Standard Widget Toolkit (SWT) is a graphical widget toolkit for use with the Java platform. It was originally developed by Stephen Northover at IBM and is now maintained by the Eclipse Foundation in tandem with the Eclipse IDE. It is an alter ...
( SWT), which was originally developed by IBM and now maintained by the
Eclipse Foundation The Eclipse Foundation AISBL is an independent, Europe-based not-for-profit corporation that acts as a steward of the Eclipse open source software development community, with legal jurisdiction in the European Union. It is an organization suppo ...
. It attempts to achieve improved performance and visualization of Java desktop applications by relying on underlying native libraries where possible. On Windows, Microsoft's .NET is a popular desktop development providing both Windows Forms (a lightweight wrapper around the Win32 API), Windows Presentation Foundation, and Silverlight. With the integration of .NET into the Windows platform, .NET apps are first class citizens in the Windows environment with tighter OS integration and native look and feel compared to Java's Swing. Outside of Windows, Silverlight is portable to the Mac OS X desktop. Mono is also becoming more common in open-source and free software systems due to its inclusionMono Applications? Aplenty!, OSNews
/ref> on many Linux desktop environments.


Server applications

This is probably the arena in which the two platforms are closest to being considered rivals. Java, through its
Java EE Jakarta EE, formerly Java Platform, Enterprise Edition (Java EE) and Java 2 Platform, Enterprise Edition (J2EE), is a set of specifications, extending Java SE with specifications for enterprise features such as distributed computing and web ser ...
(a.k.a. Java Platform Enterprise Edition) platform, and .NET through ASP.NET, compete to create web-based dynamic content and applications. Both platforms are well used and supported in this market. Of the top 1,000 websites, approximately 24% use ASP.NET and also 24% use Java, whereas of all the websites approximately 17% use ASP.NET and 3% use Java. Some of Oracle's Java-related license agreements for Java EE define aspects of the Java platform as a trade secret,Java EE SDK 5 Update 2 No JDK download page (reference to license agreement)
/ref> and prohibit the end user from contributing to a third-party Java environment. Specifically, at least one current license for an Oracle Java EE development package contains the following terms: ''"You may make a single archival copy of Software, but otherwise may not copy, modify, or distribute Software." — "Unless enforcement is prohibited by applicable law, you may not decompile, or reverse engineer Software." — "You may not publish or provide the results of any benchmark or comparison tests run on Software to any third party without the prior written consent of Oracle." — "Software is confidential and copyrighted."'' However, while Oracle's software is subject to the above license terms, Oracle's Java EE
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
reference has been implemented under an open-source license by the
WildFly WildFly, formerly known as JBoss AS, or simply JBoss, is an application server written by JBoss, now developed by Red Hat. WildFly is written in Java and implements the Java Platform, Enterprise Edition (Java EE) specification. It runs on mul ...
(originally JBoss) and
JOnAS Jonas may refer to: Geography * Jonas, Netherlands, Netherlands * Jonas, Pennsylvania, United States * Jonas Ridge, North Carolina, United States People with the name * Jonas (name), people with the given name or surname Jonas * Jonas, one o ...
projects. Microsoft's implementation of ASP.NET is not part of the standardized CLI and, while Microsoft's runtime environment and development tools are not subject to comparable secrecy agreements to Java EE, the official Microsoft tools are not open source or
free software Free software or libre software is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, and distribute it and any adapted versions. Free software is a matter of liberty, no ...
, and require Windows servers. However, a
cross-platform 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 ...
free software ASP.NET implementation is part of the
Mono project Mono is a free and open-source .NET Framework-compatible software framework. Originally by Ximian, it was later acquired by Novell, and is now being led by Xamarin, a subsidiary of Microsoft and the .NET Foundation. Mono can be run on many softwa ...
(minus Web Parts and Web Services Enhancements).Mono: ASP.NET
/ref> Mono supports ASP.NET 4.0 including Web Forms, Microsoft AJAX, and ASP.NET MVC.Mono: ASP.NET
/ref>


Embedded applications


Mobile applications

Google's popular Android platform for mobile application is based on Java. Google adopted a customised virtual machine called Dalvik to optimise the execution of Java code for mobile devices. Oracle provides
Java ME Java Platform, Micro Edition or Java ME is a computing platform for development and deployment of portable code for embedded and mobile devices (micro-controllers, sensors, gateways, mobile phones, personal digital assistants, TV set-top ...
; a reference implementation for mobile OEM vendors. Java ME is made up of various profiles that are subsets of the Java desktop environment with additional libraries targeted at mobile and set-top-box development. Java ME has a very large base within the mobile phone and PDA markets, with only the cheapest devices now devoid of a KVM (a cut-down
JVM A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally describes ...
for use on devices with limited processing power). Java software, including many games, is commonplace. While many feature phones include a JVM, they are not always heavily used by users (particularly in South Africa). Initially Java applications on most phones typically consisted of menuing systems, small games, or systems to download ringtones etc. However, more-powerful phones are increasingly being sold with simple applications pre-loaded, such as translation dictionaries, world clock displays (darkness/light, time zones, etc.), and calculators. Some of these are written in Java, although how often phone owners actually use them is probably unknown. Microsoft currently ships the
.NET Compact Framework The Microsoft .NET Compact Framework (.NET CF) is a version of the .NET Framework that is designed to run on resource constrained mobile/embedded devices such as personal digital assistants (PDAs), mobile phones, factory controllers, set-top box ...
that runs on Windows CE and mobile devices, set-top boxes, and PDAs as well as the
Xbox 360 The Xbox 360 is a home video game console developed by Microsoft. As the successor to the original Xbox, it is the second console in the Xbox series. It competed with Sony's PlayStation 3 and Nintendo's Wii as part of the seventh generati ...
. Microsoft also provides the
.NET Micro Framework The .NET Micro Framework (NETMF) is a .NET Framework platform for resource-constrained devices with at least 512  kB of flash and 256 kB of random-access memory (RAM). It includes a small version of the .NET Common Language Runtime (CLR ...
for embedded developers with limited resources. Alternatively, Novell licenses embeddable versions of Mono to third parties to use in their devices, and
Xamarin Xamarin is a Microsoft-owned San Francisco-based software company founded in May 2011 by the engineers that created Mono, Xamarin.Android (formerly Mono for Android) and Xamarin.iOS (formerly MonoTouch), which are cross-platform implementatio ...
commercially distributes the MonoDroid and
MonoTouch Mono is a free and open-source .NET Framework-compatible software framework. Originally by Ximian, it was later acquired by Novell, and is now being led by Xamarin, a subsidiary of Microsoft and the .NET Foundation. Mono can be run on many so ...
framework for Android and iPhone development, respectively. Windows Phone 7 uses Silverlight for native apps, but Windows Phone 8 has C# and XAML as the main languages.


Home entertainment technologies

Java has found a market in digital television, where it can be used to provide software that sits alongside programming, or extends the capabilities of a given
set-top box A set-top box (STB), also colloquially known as a cable box and historically television decoder, is an information appliance device that generally contains a TV-tuner input and displays output to a television set and an external source of sign ...
.
TiVo TiVo ( ) is a digital video recorder (DVR) developed and marketed by Xperi (previously by TiVo Corporation and TiVo Inc.) and introduced in 1999. TiVo provides an on-screen guide of scheduled broadcast programming television programs, whose fea ...
, for example, has a facility called "
Home Media Engine A home, or domicile, is a space used as a permanent or semi-permanent residence for one or many humans, and sometimes various companion animals. It is a fully or semi sheltered space and can have both interior and exterior aspects to it. H ...
", which allows
Java TV Java TV is a Java-based software framework designed for use on TV set-top boxes, based on components called Xlets. It is currently used only on the Connected Device Configuration, specifically for iTV applications development. The API includes t ...
software to be transmitted to an appropriate TiVo device to complement programming or provide extra functionality (for example, personalized stock tickers on a business news program). A variant of Java has been accepted as the official software tool for use on the next generation optical disc technology
Blu-ray The Blu-ray Disc (BD), often known simply as Blu-ray, is a digital optical disc data storage format. It was invented and developed in 2005 and released on June 20, 2006 worldwide. It is designed to supersede the DVD format, and capable of st ...
, via the
BD-J BD-J, or Blu-ray Disc Java, is a specification supporting Java ME (specifically the Personal Basis Profile of the Connected Device Configuration or CDC) Xlets for advanced content on Blu-ray Disc and the Packaged Media profile of Globally Execut ...
interactive platform. This will mean that interactive content, such as menus, games, downloadables, etc. on all Blu-ray optical discs will be created under a variant of the Java platform. Rather than using Java,
HD DVD HD DVD (short for High Definition Digital Versatile Disc) is an obsolete high-density optical disc format for storing data and playback of high-definition video. Supported principally by Toshiba, HD DVD was envisioned to be the successor to the ...
(the defunct high-definition successor to
DVD The DVD (common abbreviation for Digital Video Disc or Digital Versatile Disc) is a digital optical disc data storage format. It was invented and developed in 1995 and first released on November 1, 1996, in Japan. The medium can store any kind ...
) used a technology jointly developed by
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washin ...
and
Disney The Walt Disney Company, commonly known as Disney (), is an American multinational mass media and entertainment conglomerate headquartered at the Walt Disney Studios complex in Burbank, California. Disney was originally founded on October ...
called
HDi The Human Development Index (HDI) is a statistic composite index of life expectancy, education (mean years of schooling completed and expected years of schooling upon entering the education system), and per capita income indicators, wh ...
that was based on
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable ...
, CSS,
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of websites use JavaScript on the client side for webpage behavior, of ...
, and other technologies that are comparable to those used by standard
web browser A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used o ...
s. The BD-J platform
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
is more extensive than its iHD rival, with an alleged 8,000 methods and interfaces, as opposed to iHD's 400. And while Microsoft is pushing iHD's XML presentation layer by including it with Windows Vista, iHD is still a newcomer in a market sector where Java technologies are already commonplace.Format Wars - Blu-ray vs HD DVD
/ref> However, the fact that the HD DVD format has been abandoned in favor of Blu-ray means that HDi is no longer supported on any
optical disc In computing and optical disc recording technologies, an optical disc (OD) is a flat, usually circular disc that encodes binary data (bits) in the form of pits and lands on a special material, often aluminum, on one of its flat surfaces. ...
format, making the BD-J format a clear winner.


Runtime inclusion in operating systems


.NET/Mono

On Windows, Microsoft has promoted .NET as its flagship development platformMicrosoft article that refers to C# as its "flagship" language.
/ref> by including the .NET runtime in Windows XP Service Pack 2 and 3, Windows Server 2003, Windows Vista, Windows Server 2008 and Windows 7. Microsoft also distributes the Visual Studio Express development environment at no cost, and the Visual Studio Community development environment at no cost, with limited use for organizations.Visual Studio Community
/ref> .NET Framework 3.5 runtime is not pre-installed on versions of Windows prior to Vista SP1, and must be downloaded by the user, which has been criticized because of its large size (65 MB download for .NET 3.5). While neither .NET nor Mono are installed with Mac OS X out-of-the-box, the Mono project can be downloaded and installed separately, for free, for any Mac user who wants to build or run C# and .NET software. As of 13 May 2008, Mono's System.WindowsForms 2.0 is API-complete (contains 100% of classes, methods etc. in Microsoft's System.WindowsForms 2.0); also System.WindowsForms 2.0 works natively on Mac OS X. C# and the CLI are included and used in a number of Linux- and BSD-based operating systems by way of including the free software Mono Project.Debian Mono Packages
/ref>Wikipedia Uses Mono; Mono Integrated into Ubuntu/Debian - OSNews.com
/ref> As a result of inclusion of .NET or Mono runtimes in the distributions of Windows and Linux, non-GUI applications that use the programming interfaces that are common to both .NET and Mono can be developed in C# or any other .NET language and then deployed across many operating systems and processor architectures using a runtime environment that is available as a part of the operating system's installation. Both Microsoft .NET and the Mono project have complete support for the Ecma- and ISO-standardized C# language and .NET runtime, and many of Microsoft's non-standardized .NET programming interfaces have been implemented or are under development in Mono, but each environment includes many components that have not been implemented in the other.


Java

No current version of Windows ships with Java; they stopped shipping with Windows XP SP1a. Java was pre-installed on all new Apple computers beginning with Mac OS X 10.0 and ending with 10.6, after which Java 6 became an optional Apple download. Java 7 and later releases are provided by Oracle. Java comes pre-installed with many commercial Unix flavors, including those from Hewlett Packard, IBM, and Oracle. As of June 2009, the Debian, Fedora 9, Mandriva,
OpenSUSE openSUSE () is a free and open source RPM-based Linux distribution developed by the openSUSE project. The initial release of the community project was a beta version of SUSE Linux 10.0. Additionally the project creates a variety of tools, s ...
,
Slackware Slackware is a Linux distribution created by Patrick Volkerding in 1993. Originally based on Softlanding Linux System, Slackware has been the basis for many other Linux distributions, most notably the first versions of SUSE Linux distributio ...
extra, and Ubuntu 8.04 distributions are available with OpenJDK, based completely on free and open-source code. Since June 2008, OpenJDK passed all of the compatibility tests in the Java SE 6 JCK and can claim to be a fully compatible Java 6 implementation. OpenJDK can run complex applications such as Eclipse,
GlassFish GlassFish is an open-source Jakarta EE platform application server project started by Sun Microsystems, then sponsored by Oracle Corporation, and now living at the Eclipse Foundation and supported by Payara, Oracle and Red Hat. The supported v ...
,
WildFly WildFly, formerly known as JBoss AS, or simply JBoss, is an application server written by JBoss, now developed by Red Hat. WildFly is written in Java and implements the Java Platform, Enterprise Edition (Java EE) specification. It runs on mul ...
, or
Netbeans NetBeans is an integrated development environment (IDE) for Java. NetBeans allows applications to be developed from a set of modular software components called ''modules''. NetBeans runs on Windows, macOS, Linux and Solaris. In addition to Java ...
. The Operating System Distributor License for Java (DLJ)Operating System Distributor License for Java (DLJ)
/ref> was a Sun initiative to ease distribution issues with operating systems based on Linux or OpenSolaris. If Java is not installed on a computer by default, it may be downloaded by the user as a Web plugin. The Web plugin process has been criticized because of the size of the Java plugin. Unlike other plugins, the Java download is a full runtime environment capable of running not just applets, but full applications and dynamic WebStart apps. Because of this, the perceived download footprint is larger than some web plugins. However, compared to Java, other popular browser plugins have larger sizes: Java 6 JRE is 13 MB, but
Acrobat Reader Adobe Acrobat is a family of application software and Web services developed by Adobe Inc. to view, create, manipulate, print and manage Portable Document Format (PDF) files. The family comprises Acrobat Reader (formerly Reader), Acrobat (former ...
is 33 MB, QuickTime 19 MB,
Windows Media Player Windows Media Player (WMP) is the first media player (application software), media player and media library application that was developed by Microsoft for playing sound reproduction, audio, video and viewing images on personal computers runnin ...
25 MB, the
.NET Framework 3.0 Microsoft started development on the .NET Framework in the late 1990s originally under the name of Next Generation Windows Services (NGWS). By late 2001 the first beta versions of .NET 1.0 were released. The first version of .NET Framework was ...
runtime is 54 MB, and the .NET Framework 3.5 runtime is 197 MB (it's a united package for x86, x64, and IA-64; each part has approximately 60 MB). At the
JavaOne __NOTOC__ JavaOne is an annual conference first organized in 1996 by Sun Microsystems to discuss Java technologies, primarily among Java developers. It was held in San Francisco, California, typically running from a Monday to Thursday in summer ...
event in May 2007, Sun announced that the deployment issues with Java would be solved in two major updates during the lifespan of Java 6 (the changes will not be held over to Java 7.) These include: *The introduction of a new consumer JRE edition, with an initial 2 Mb footprint and the ability to download the remaining 9 Mb in sections using an on-demand methodology. *The development of drop-in cross-platform
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of websites use JavaScript on the client side for webpage behavior, of ...
code, which can be used from a Web page to install the necessary JRE for a given applet or
Rich Internet Application A rich web application (originally called a rich Internet application, or RIA or installable Internet application) is a web application that has many of the characteristics of desktop application software. The concept is closely related to a sing ...
to run, if necessary. *An improvement in support for automatically downloading updates to the JRE. *support for pre-loading of the JRE, so applets and applications written in Java start up almost instantaneously.


See also

* Comparison of C# and Java languages *
Java programming language Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let programmers ''write once, run anywh ...


References


External links


Moving to C# and the .NET Framework
at
MSDN Microsoft Developer Network (MSDN) was the division of Microsoft responsible for managing the firm's relationship with developers and testers, such as hardware developers interested in the operating system (OS), and software developers developing ...

ECMA-335 Common Language Infrastructure (CLI), 4th edition (June 2006)
- free download of Ecma CLI standard

- the official ISO/IEC CLI standard {{Common Language Infrastructure .NET Java (programming language) Java and .NET platforms