What's the difference between the inner workings of Java's JVM and .NET's CLR?
Perhaps a starting point would be, are they basically the same thing in their respective environments (Java > JVM > Machine code) (C# > CLR > IL).
Update: Several people have alluded to the points I was trying to cover:
@George Mauer - this sounds very interesting:
Already posted this once but here is a series of interviews with c# chief language designer Anders Hejlsberg.
Net is better than JVM, as JVM simply converts the code into bytecode for underlying operating systems. This is not directed for computing machines and is a bit slower than CLR. Java has many IDEs for its programming like Eclipse, NetBeans, etc.Net, on the other hand, has a Visual Studio.
Role of CLR in the execution of a C# program MSIL is machine-independent code. Now CLR comes into existence. CLR provides the services and runtime environment to the MSIL code. Internally CLR includes the JIT(Just-In-Time) compiler which converts the MSIL code to machine code which further executed by CPU.
NET CLR is equivalent to JVM (Java Virtual Machine).
The Common Language Runtime (CLR), the virtual machine component of Microsoft . NET Framework, manages the execution of . NET programs. Just-in-time compilation converts the managed code (compiled intermediate language code) into machine instructions which are then executed on the CPU of the computer.
This should be a great thread.
One of the biggest differences is between the CLR and JVM is the CLR"s native integration of generics.
Java instead removes the generic types and the JVM can only work with objects by autoboxing the objects it appears to be pseudo generics.
From here. I couldn't have said it better (Well, with the exception of a flame war, this is a flameless place :-) ).
Hello,
Responding to your question seems fraught with peril by starting a flame war, so I'll proceed cautiously.
There are a number of fundamental technical similarities between the Java Runtime and the Common Language Runtime, including garbage collected memory, an intermediate language (Microsoft IL versus Java ByteCode), core system libraries, and support for fairly high level languages, code security, and deployment.
However, each of these 'similar' areas also have a number of sizable and small differences, and it's beyond the scope of a simple Forum post to describe most of them.
I would suggest asking a more targetted question about any of the various runtime features and component areas (e.g. memory management, compilation, system libraries, security, etc.) and then we can provide a more targetted response (e.g. a blog, a technical article, or some books).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With