Visual Studio .NET - DIFFERENCE BETWEEN JAVA AND DOTNET

Asked By RAMAKRISHNA T on 27-Oct-11 03:36 AM
I want to know the difference between Java Dotnet.
dipa ahuja replied to RAMAKRISHNA T on 27-Oct-11 03:41 AM
Differences between .Net and Java include
  • Java is from Sun, .Net is from Microsoft
  • Java is a language plus a runtime, .Net is a runtime framework that supports multiple languages, Visual Basic and C# (the .Net language most similar to Java) among them.
  • C# is very similar to Java but a few years younger, and a bit nicer in some respects - it has a slightly simpler syntax for some common constructs.
  • Java is more platform independent, it runs on several operating systems including Windows, Mac and Linux. .Net is primarily for Windows. Although the open source project Mono is developing a multi-platform runtime for .Net, so this is less of an issue than it used to be. 
  • .Net has a more integrated development environment, as the IDE, runtime and server all come from Microsoft as a standard package, while Java is based on third-party tool and server providers. It used to be the case that the .Net development environment was clearly superior, but the difference is smaller these days. 
  • It can be argued that Java gives more flexibility, as there are more server- and IDE-providers to choose from, at the cost of some extra overhead for the developer to get the different pieces to work together.


Functionality wise, there is not a lot of difference between the two, at least not when used to develop web applications. 

For desktop applications, .Net naturally has an edge in Windows integration. 
note: Oracle bought Sun Microsystems (Sun).

Venkat K replied to RAMAKRISHNA T on 27-Oct-11 03:55 AM
It is a basic question that has been asked almost by all new developers.
Java is a creation of Sun Microsystems while .Net is a product from the stable of Microsoft. Both Java and .Net are used to build a comprehensive web services system and enterprise applications.

The Enterprise Edition of Java 2 Platform was created to ease the process of development, design and deployment of complex enterprise solutions and the J2EE architecture is based on Java. .Net is a product suite that allows an organization to create enterprise-class web services. The difference between both is that that .Net is a product strategy while J2EE is an industry standard that gives a developer the option to choose vendor products and tools. .NET is based on the language C# and while Java runs on any platform with the help of Java VM, C# can only work on Windows currently.

Here is an article that describes on how the programmers approach on theses two and the impact on the paltforms on both of these technologies:
http://www.online-brain.com/blogs/java_dotnet

Thanks
Jitendra Faye replied to RAMAKRISHNA T on 27-Oct-11 04:26 AM
Here are some major differences between Java and .Net from some website

1.Conceptual Difference

Conceptually, Java is two things: the Java platform (runtime and APIs), and the Java language.
The purpose of the Java platform is to support applications written in the Java language and
compiled to Java bytecode. The ideal of Java has always been a single language on multiple platforms.

.NET also is two things: the .NET Framework (runtime and APIs), and the plethora of supported
programming languages. The purpose of the NET Framework is to support applications written
in any language and compiled to MSIL. The goal of .NET is a single platform shared by multiple language

2.Multi-language

The most obvious difference between the two platforms is the language. If you're writing
to the Java platform, you're writing code in Java.

.NET applications, on the other hand, can be written in any language that supports .NET.
The .NET Framework SDK ships with three languages: C#, Visual Basic .NET, and Jscript .NET.
Third party languages include COBOL, Eiffel, Perl, Python, Pascal, and many others.
There currently are over 20 languages that support .NET. And because they all target the
Common Language Runtime, programs written in any of these languages can access objects
created by any of the other languages.

Hope this will help you.
Riley K replied to RAMAKRISHNA T on 27-Oct-11 04:40 AM


Net has Multilanguage support. While java has based on java language only. According to Microsoft latest news .Net support around 40 languages including major market share COBOL, Vb.net, C#.net, Perl and many others.

Since java is multiplatform so it’s set of Framework Classes is limited to what is available on all platforms. While .Net has set of all the Classes available on Microsoft Platform.


  • C# includes delegates, whereas Java does not. Some argue that delegates complicate the method invocation model, because they are handled through reflection, which is generally slow. On the other hand, they can simplify the code by removing the need to declare new (possibly anonymous) classes to hook to events.

  • Java requires that a source file name must match the only public class inside it, while C# allows multiple public classes in the same file.

Regards
Sri K replied to RAMAKRISHNA T on 27-Oct-11 04:51 AM
The biggest difference between Java and .NET is the basic http://www.blurtit.com/q941248.html behind the languages. Java is a programming language designed to be run on many different platforms, and so uses a common language which has to be compiled and run on different platforms (eg. windows, mac and linux). Microsoft, with their offering of .NET, takes on a different approach, by allowing you to program in any language you choose, but has compilers for many different languages that generates a platform specific code (i.e. Microsoft or Windows). Therefore, Java can be used to write programs for many different operating systems, and .NET can be used to make any programming language into a Windows program. This is all based on the original design goals of the programming language, and has both advantages and disadvantages over each other. For example, .NET would be good for integrating legacy code from different languages into a working program, when you don't want to re-write each piece of code into the same programming language. Both .NET and Java are otherwise object-oriented programming languages, with their obvious syntax difference
Suchit shah replied to RAMAKRISHNA T on 27-Oct-11 09:04 AM
First clearing that Java is two things Java language and Java Platform. Similarly .Net is two things the .Net supported languages and .Net Platform. Now come to major difference which is root cause of differences between Java and .Net
The ideal of Java has always been a Single language shared by multiple Platforms. Whereas .Net is based on Multiple languages shared by single Platform. Now come to derived differences from this major difference.

1).Net has Multilanguage support. While java has based on java language only. According to Microsoft latest news .Net support around 40 languages including major market share COBOL, Vb.net, C#.net, Perl and many others.

2)Since java is multiplatform so it’s set of Framework Classes is limited to what is available on all platforms. While .Net has set of all the Classes available on Microsoft Platform.

3)According to Sun, Java is renowned as “Write once run anywhere”. While .net has no such scene. But my perception is, its not completely true to say “Write once run anywhere” but one aspect is that most of the applications written today focus on one platform only. Similarly to assure its multiple support much time needed to debug it on all platforms. So I would like to say Sun that it’s not “Write once run anywhere” but its “Write once and Debug everywhere.

4).Net due to disconnected data access through ADO.Net has hi level of performance against Java JDBC which requires multiple round trips to data base.

5)Java has support to open source platform while .Net has no direct support for Open source Platforms.