Execution of Java program: Main.java Intermediate Contains Interpreter language
Byte code is the intermediate code, just like object code in C language. Byte code made Java platform independent. Java applications are independent of OS. Platform for a Java application is JRE and further this JRE is dependent on OS.
Execution and Compilation of .NET: Commo C# C# n Compiler languag MSIL e runtime code CLR VB.NET VB.NET (Microsof Native Compiler t Code Intermedi ate Other .NET Other Language languages Compiler ) Compile time Runtime
.NET framework is platform dependent. .NET application will run if .NET framework is installed on that machine. Conceptually, .NET is platform independent. .NET framework was developed only for Linux, other than windows, and is named as Mono.NET.
JVM v/s CLR: JVM designed for platform independence Single language: Java (?) A separate JVM for each OS & device CLR designed for language independence Multiple languages for development C++, VB, C#, (J#) APL, COBOL, Eiffel, Forth, Fortran, Haskel, SML, Mercury, Mondrian, Oberon, Pascal, Perl, Python, RPG, Scheme, SmallScript, … Impressive usage of formal methods and programming language research during development Underlying OS: Windows (?)
CLR vs JVM: C# VB Managed Lots of other .Net C/C++ Languages Java MSIL Byte Codes CLR CLR or or (Com (Co mon mo Language Lan JRE JR (JVM (JV ) Runtime Ru ) Windows OS Mac Win Unix Linux Both are ‘middle layers’ between an intermediate language & the underlying OS
Java Byte Code and MSIL: Java byte code (or JVML) is the low- level language of the JVM. MSIL (or CIL or IL) is the low-level language of the .NET Common Language Runtime (CLR). Superficially, the two languages look very similar.
Choosing between Java and .Net The ultimate choice usually depends not on technical superiority, but on: cultural/”religious”/political preferences Skill set of your developers Customer preference Vendor relations