Anonymous
Anonymous asked in Computers & InternetProgramming & Design · 1 month ago

Why can't Java be used with .NET?

Java I know inside and out...I'm now helping work on a project with a small team, and they are using C# with Visual Studio. I did a class with C# about 2 years ago, I dont remember it all the well.

Why can't Java be used with .NET?

2 Answers

Relevance
  • 1 month ago

    There was a falling-out between Microsoft and Sun Microsystems (who developed Java) as MS kept changing things in the releases included with Windows at the time, making them incompatible with standard Java.

    Because of that, Sun withdrew their right to include Java with Windows, or something like that. It had to be added by users, from the main Java distribution site.

    Microsoft released C# just a few months later as their custom alternative to Java; it's directly in competition with it. 

    • Login to reply the answers
  • 1 month ago

    There's really not much of a point.  The C# language is basically a superset of the Java language as of the early 2000s.  If you had a Java implementation that could interact with the .NET framework classes, with binary code that could run in .NET IL engine instead of a JVM, the result would rarely be different enough from a C# program to make it worth implementing the compiler.

    And it wouldn't really be Java without the Java SE platform classes; and those won't interoperate with .NET.

    Just buckle down and learn C#.  The generics are really much better than Java's thin layer of compile-time sugar wrapping java.lang.Object references.  And it really is possible to understand C# delegates.  Honest.  Maybe not on the first reading, but possible nonetheless.  :^O

    • Login to reply the answers
Still have questions? Get your answers by asking now.