Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JVM over CLR and viceversa

Tags:

java

.net

jvm

clr

I use Java and .NET since many years now and I see many implementations of the JVM and the CLR around; many OSs, many vendors, etc., but I'm asking here if anyone knows about implementing a CLR on a JVM or a JVM on a CLR.

If such a bridge could be done, it should make thing really more run-time portable!

I know there are few differences and many similarities between CLR and JVM, but there are also cross-compilers between the two runitimes, like XMLVM, and maybe it is possible to give this functionality at runtime...

Is this possible? If not what are the principal technical obstacles?

like image 217
Andrea Colleoni Avatar asked Aug 06 '12 08:08

Andrea Colleoni


People also ask

Is JVM better than CLR?

Top differences between the CLR and JVM include: CLR was designed to be language-neutral, JVM was designed to be Java-specific. CLR was originally only Windows-compatible, JVM works with all major OSs. CLR uses a JIT compiler, JVM uses a specialized JIT compiler called Java HotSpot.

What is the equivalent of JVM in C#?

Of course, C# is defined purely as a language. There's no reason why it cannot be made to run on other runtimes, or indeed in an interpreted mode. But the "equivalent" of "the" JVM (implying the default one) is the CLR.

Is CLR a 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.

What is the equivalent to the CLR in Java?

NET CLR is equivalent to JVM (Java Virtual Machine).


1 Answers

IKVM.NET allows to run Java bytecode on top CLR (Mono or MS) and to compile java source code to CLI, of course library support might be an issue.

like image 61
Julien Ch. Avatar answered Oct 05 '22 23:10

Julien Ch.