Comparison Of The Java And .NET Platforms
   HOME

TheInfoList



OR:

Comparison of the Java and .NET platforms.


Legal issues


.NET

The
Mono Mono may refer to: Common meanings * Infectious mononucleosis, "the kissing disease" * Monaural, monophonic sound reproduction, often shortened to mono * Mono-, a numerical prefix representing anything single Music Performers * Mono (Japanese b ...
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 us ...
. 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, 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 Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
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)#501(c)(3), 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 ...
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 (Free software), four freedoms to run, study, share, and modify the software. The license was th ...
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 ASP.NET MVC is a web application framework developed by Microsoft that implements the model–view–controller (MVC) pattern. It is no longer in active development. It is open-source software, apart from the ASP.NET Web Forms component, which is ...
, Entity Framework, Managed Extensibility Framework, Roslyn compiler-as-a-service infrastructure (together with C# and Visual Basic .NET 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 implementation ...
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) and
Swing Swing or swinging may refer to: Apparatus * Swing (seat), a hanging seat that swings back and forth * Pendulum, an object that swings * Russian swing, a swing-like circus apparatus * Sex swing, a type of harness for sexual intercourse * Swing rid ...
libraries are not shy of features, Java has struggled to establish a foothold in the desktop market.
Sun Microsystems Sun Microsystems, Inc. (Sun for short) was an American technology company that sold computers, computer components, software, and information technology services and created the Java programming language, the Solaris operating system, ZFS, the ...
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, 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 (programming language), Java technologies, primarily among Java developers. It was held in San Francisco, California, typically running from a M ...
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 Computing platform, software platform used for production of Flash animation, animations, rich web applications, application software, desktop applications, mobile apps, mo ...
( JavaFX), 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 tradition ...
libraries. An alternative to AWT and Swing is the Standard Widget Toolkit ( SWT), which was originally developed by IBM and now maintained by the Eclipse Foundation. 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 (a.k.a. Java Platform Enterprise Edition) platform, and .NET through
ASP.NET ASP.NET is an open-source, server-side web-application framework designed for web development to produce dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, applications and services. The name stan ...
, 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 (computing), interface, offering a service to other pieces of software. A document or standa ...
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 multip ...
(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 of ...
projects. Microsoft's implementation of
ASP.NET ASP.NET is an open-source, server-side web-application framework designed for web development to produce dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, applications and services. The name stan ...
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 Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
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 r ...
free software ASP.NET implementation is part of the Mono project (minus
Web Parts Web most often refers to: * Spider web, a silken structure created by the animal * World Wide Web or the Web, an Internet-based hypertext system Web, WEB, or the Web may also refer to: Computing * WEB, a literate programming system created by ...
and
Web Services Enhancements Web Services Enhancements (WSE) is an obsolete add-on to the Microsoft .NET Framework, which includes a set of classes that implement additional WS-* web service specifications chiefly in areas such as security, reliable messaging, and sending atta ...
).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 Android may refer to: Science and technology * Android (robot), a humanoid robot or synthetic organism designed to imitate a human * Android (operating system), Google's mobile operating system ** Bugdroid, a Google mascot sometimes referred to ...
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; 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 PDA may refer to: Science and technology * Patron-driven acquisition, a mechanism for libraries to purchase books *Personal digital assistant, a mobile device * Photodiode array, a type of detector * Polydiacetylenes, a family of conducting poly ...
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 generation ...
. 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 implementation ...
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 softwa ...
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, 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. ...
", which allows Java TV 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 sto ...
, via the BD-J 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 (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 kin ...
) 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, Washing ...
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 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. T ...
,
CSS Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language such as HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS is a cornerstone techno ...
,
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 Website, websites use JavaScript on the Client (computing), client side ...
, 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 on ...
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 (computing), interface, offering a service to other pieces of software. A document or standa ...
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 Mac OS X 10.0 (code named Cheetah) is the first major release of macOS, Mac OS X, Apple Computer, Apple's desktop and server operating system. It was released on March 24, 2001 for a price of $129 after a Mac OS X Public Beta, public beta. Mac ...
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 The Hewlett-Packard Company, commonly shortened to Hewlett-Packard ( ) or HP, was an American multinational information technology company headquartered in Palo Alto, California. HP developed and provided a wide variety of hardware components ...
, IBM, and
Oracle An oracle is a person or agency considered to provide wise and insightful counsel or prophetic predictions, most notably including precognition of the future, inspired by deities. As such, it is a form of divination. Description The word '' ...
. As of June 2009, the
Debian Debian (), also known as Debian GNU/Linux, is a Linux distribution composed of free and open-source software, developed by the community-supported Debian Project, which was established by Ian Murdock on August 16, 1993. The first version of D ...
, Fedora 9,
Mandriva Mandriva S.A. was a public software company specializing in Linux and open-source software. Its corporate headquarters was in Paris, and it had development centers in Metz, France and Curitiba, Brazil. Mandriva, S.A. was the developer and mainta ...
, OpenSUSE, Slackware extra, and Ubuntu 8.04 distributions are available with OpenJDK, based completely on
free Free may refer to: Concept * Freedom, having the ability to do something, without having to obey anyone/anything * Freethought, a position that beliefs should be formed only on the basis of logic, reason, and empiricism * Emancipate, to procur ...
and
open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
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 An eclipse is an astronomical event that occurs when an astronomical object or spacecraft is temporarily obscured, by passing into the shadow of another body or by having another body pass between it and the viewer. This alignment of three ce ...
, GlassFish,
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 multip ...
, or Netbeans. 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 The Joe Rogan Experience (JRE) is a podcast hosted by American comedian and presenter Joe Rogan. JRE can also mean: *Java Runtime Environment *The Joe Rogan Experience *JR East, see East Japan Railway Company The is a major passenger railway ...
is 13 MB, but Acrobat Reader is 33 MB,
QuickTime QuickTime is an extensible multimedia framework developed by Apple Inc., capable of handling various formats of digital video, picture, sound, panoramic images, and interactivity. Created in 1991, the latest Mac version, QuickTime X, is avai ...
19 MB,
Windows Media Player Windows Media Player (WMP) is the first media player and media library application that was developed by Microsoft for playing audio, video and viewing images on personal computers running the Microsoft Windows operating system, as well as on ...
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 (programming language), Java technologies, primarily among Java developers. It was held in San Francisco, California, typically running from a M ...
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 Website, websites use JavaScript on the Client (computing), client side ...
code, which can be used from a Web page to install the necessary JRE for a given applet or Rich Internet Application 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


References


External links


Moving to C# and the .NET Framework
at MSDN
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