Skip to Content
Author's profile photo Former Member

Differences between Java and .NET

There have been some publications about .NET and Java. Microsoft published a paper showing how to convert from Java to .NET. Here are my thoughts on the differences between the two “platforms”.

Why Java and .NET

Java is the technical foundation of many components of the NetWeaver platform, to name a few:

  • WebAS for Java
  • NetWeaver Development Studio
  • Enterprise Portal, PDK
  • Parts of XI

.NET is a technology platform marketed by Microsoft. Because Microsoft is a global player and can be seen as being able to penetrate the market resp. influencing desires, it is important for another global layer like SAP to support technologies coming from Microsoft. .NET is supported by NetWeaver, e.g. it is possible to call .NET components.

Differences between Java and .NET

Maturity versus innovation

Not being a .NET idolizer, I still would allow myself to say that .NET offers several innoations, some of them described later on. Java is also seen as innovative as it was the first popular language purely implementing OO principles (besides some very few exceptions existing for performance and usability reasons). But for Java we can speak of a mature solution, .NET still has to prove.Take Robocode for example, for which even a genetic algorithm is available in Java to evolve robot programs!

One language vs. language integration

Both languages are based on the principle of object-orientation. To be exact, .NET is not a language. It is a platform integrating several languages like (in no special order):

  • C# (C-Sharp)
  • J#
  • Pascal
  • PERL
  • Python
  • Visual Basic .NET
  • Managed C++

Java itself is a language and it is only one language. That is a big difference to .NET. Java could be seen as a “platform”, too, if taking the tools, libraries, IDEs, JSR’s etc. into account. But mainly, people speak of a language when talking about Java.


Java does not support versioning of class files explicitely. You have to care for yourself to provide the correct version of the classes and libraries to be used.
In .NET there exists a Global Assembly Cache (GAC). The GAC offers you the possibility to explicitely decide which version of a library you want to use.

Development Environment

To develop Java applications you can use any development environment (IDE) available. There are plenty of popular IDE’s for Java, many of them completely free.
Microsoft provides its own IDE for coding .NET applications. To my knowledge it is called “Visual Studio .NET 2003” (planned is “Visual Studio .NET 2005”, codename “Whidbey”). Additionally, there will be Visual Studio code name “Orcas” for the Windows operating system with code name “Longhorn”.
I assume that there are or will be other third-party IDE’s for .NET as well. But as .NET is sort of a young technology it will take some time to close the gap to the broad variety Java offers.

Annotations vs. Attributes

In my recent weblog entry, I discussed annotations for Java. The similar concept in .NET is called Attributes. With an attribute you can mark a normal method as being a web service. The difference to Java annotations is the immediate impact on the code. Java annotations offer a more meta data centric approach, whereas .NET attributes allow to modify the code base.

Database Connectivity

Java provides JDBC to connect to many databases. JDBC is similar to ODBC from Microsoft. In .NET the database connectivity is done via ADO.NET which in turn is comparable to JDBC and ODBC. I have no relevant practical experience with ADO.NET and cannot judge over it. I assume that Microsoft offers an acceptable solution with ADO.NET as persistence plays a fundamental role within a framework.


Java and .NET are sort of similar approaches within the OO world. Chose your vendor, would be the decision to make. There are not too many differences although some major differentiators exist. I personally don’t like being dependent on the goodwill of a commercial player like Microsoft. Java seems to me the better alternative because of its maturity, its openness and because it’s easy to go (without downloading zillions of libraries and runtimes as this is the case with .NET, just watch your Windows 2000 and XP update suggestions!).

Assigned tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      ... java can be run on any platform. So far .Net based applications require the installation of the .Net framework, otherwise they will not run. As far as I know, it is not available for non Microsoft OS.

      I have developed in both Java, Visual Basic .Net and some C# (and a few of other languages). I will not trade my .Net for Java again. It is young, but also full of innovations beyond the one's mentioned here. I also love the idea of being able to code in almost any language and reuse the code. We will see what the future brings. My guess is that Java and .Net will coexist peacefully. Java, because it is free, good and open. .Net because it is expensive, good and will enforce Microsoft's market position. Compared to VB 6 or C++ it was overdue anyway. Right now it is a lot like SAP Business One. it has it's flaws, but it will eventually get real good.

      Lutz Morrien

      Author's profile photo Former Member
      Former Member
      Well, you do have the mono project, which they self describe as  "Mono is a comprehensive open source development platform based on the .NET framework that allows developers to build Linux and cross-platform applications with unprecedented productivity. Mono's .NET implementation is based on the ECMA standards for C# and the Common Language Infrastructure."

      As far as I understand this is a very professional project and they have come very far. Though they are a bit on the mercy of microsoft if they change the CLR (but I think microsoft are smart enough to realize that this is not the best move).

      .Net's greatest asset imho, is the IDE and how they make their tools available. Sure, you have the same in java, but you have to be a much more experienced developer to find all the good stuff (maven,hibernate,spring +++)

      Author's profile photo Former Member
      Former Member
      Java itself is a language and it is only one language

      Far from truth.
      Java is a platform & runtime that provides execution environment for any language. Of course, if this language could be compiled in bytecode or dynamically interpreted.

      Take a look at this list: Ok, there are a plethora of unsuported / outdated projects, but anyway even the remaining part is very impressive.

      Next, one of them, Groovy, is under JSR review, so we have a real chance to get STANDARD scripting language for Java _platform_.