It's almost always true that older platforms have more third party tools, libraries, projects, and support. When compared to .NET, Java has all these privileges. But time has passed since .NET first came out and now, it is a mature platform. Are there still some areas where .NET is lagging behind Java?
closed as not constructive by FrustratedWithFormsDesigner, Walter, Jarrod Roberson, Aaronaught, Mark Trapp Oct 20 '11 at 21:16
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.
You need to be careful about comparing languages vs platforms.
C# 4.0 vs Java 7
C# 4 has some advantages over Java 7. Most notably in reified generics, lambdas/closures and the ability to use LINQ. This is enough to have made some programmers make the shift.
C# 4.0 vs Other JVM languages
There are now several languages on the JVM which offer some of the C# features (lambdas for example) and interoperate with Java such as Groovy, Scala and Clojure. There are typically open source Java libraries which try to fill in other gaps.
.NET vs JVM languages
In terms of choice the JVM wins hands down. I can't speak to the language interop story on .NET but I suspect its's very good. I know that with Java 7's JVM, language interop has a fairly strong story.
This topic is so vast it's hard to even get started.
A couple of related answers
|show 12 more comments|
I would say they are lagging behind in adoption by the open source community. There are fewer library and framework choices in the .NET platform and usually the best quality ones are proprietary IMHO. Even this has been changing lately however as there are more open source projects starting on the .NET platform than ever before.
I would also like to see .NET adopt some of the Java language features for enum's. I have always liked Java's implementation of enum's better.
With that being said .NET (C#) truly is the superior language.
|show 4 more comments|
In most areas, .NET is ahead of Java. But there are a few nice features in Java, I'd like to see in .NET:
I was hard pressed to come up with the above areas where Java beats .NET. Instead, I would say that .NET beats java in the following ways:
These are just a few reasons why I program in .NET instead of Java
|show 2 more comments|
The only area I can think of is cross-platform support. Java was developed with this in mind from the start. You can argue that Mono gives you cross-platform support on .NET, but having investigated it, you can't really get the portability that Java gives you (if you start developing in .NET 4 on Windows and want to port elsewhere).
Edit: As @maple_shaft says, Java enums are also more advanced than .NET's.
For most everything else, it seems .NET is more advanced.
I'd advance that Java is significantly lagging behind .NET. The older platform has more legacy code they have to support. .NET has stronger generics and lambdas, which are quite massive advantages, plus other serious language advantages like operator overloading.
Case in point: Generics. .NET got much better generics, because Java was too scared of making existing bytecode be incompatible.
Many answers are comparing Java to .net which makes no sense to me at all--I'd think people would know better.... Perhaps you mean to compare Java to VB? That would at least work.
Also he didn't ask about Java vs C# at all, so he must have meant the JVM vs .net
The JVM has many many more languages available to it, it's multi-platform and you can get the source code for starters.
It's also more performant (last time I checked).
.net has better tool integration I believe and better OS integration, but lags in nearly every other area as far as I know. I'd really enjoy hearing other cases where .net was more advanced than the JVM (which is what the OP was asking, I believe).
If you widened the scope from .net to .net-like platforms and include MONO, you may get more answers.
I was just looking up the performance of .net vs jvm. The responses vary widely and I can't tell which are biased (Most seemed quite slanted and tested the slow java 5 vs newer C# releases).
Although that was kind of a wash hile I was looking I found this post which seems to have some great answers to the original question:
as well as advantages of .net. worth looking at.
|show 3 more comments|
Java has several disadvantages to .NET.
Being the older platform, Java only has some of the lessons that C++ taught us about how not to do object orientated programming languages. It also has a wider variety (think duplication) of add on libraries in common use. (.NET tends to use the micorosft version)
However, the key is that a programming language is not a religion, but a tool to complete a task. Java has the edge in some respects. Its performance can be noticable better than C#, it has prominance in the newer NoSQL datastore technologies, and noticably, as a website becomes heavily used, think 100,000's concurrent users, the technology used to deliver the website seems to move from .NET to java.
|show 6 more comments|
One difference are definitely the *user numbers, with even more dramatic differences amongst an academic user-base:
The following numbers are the times of how often Google’s API examples were favorited by users, which are given below for several programming languages.
Google may indeed provide a good example for a technical-web project with lesser bias than the statistics of other projects, owing to Google's 'widespread' nature.
All API project examples were started around Q4/2010.
Java as a language is IMO at least one generation behind C#. On the other hand number of ported libraries from Java to .NET exceed number of contrary ports in order of magnitude.
IMO .NET lags behind in adoption of software craftsmanship and proper software engineering principles. Things like design patterns, the
This has been my personal experience with .NET over the course of six years as a developer. I have found most .NET shops in my locale to know zero about things like design patterns, SOLID, ORMs or the like and focus 100% on quick and dirty hacks and then move on to the next task instead of developing with an eye towards maintainability and craftsmanship.
|show 5 more comments|