How the JVM and CLR know when to hit

Just wondering if anyone would be kind enough to explain to me how the JVM, CLR, and other "virtual machines" know when to "kick"?

By this I mean that you double-click on your executable file, and your computer starts executing the code, but at some point - obviously - the code must tell the machine that this code requires that some other process function and it needs had to go through op codes. So how is this going?

+3
source share
3 answers

Each executable file first runs unmanaged code that passes a control, for example. in the CLR (calls to _CorExeMain from mscoree.dll). Then the CLR (unmanaged thing) reads / compiles / executes the code (and does other things) inside your assembly.

+4
source

In .net programs, there is some kind of bootloader in the executable that launches the CLR. This bootloader is written to its own machine code, so it can be executed directly. It is followed by managed code and additional application resources, which are then accepted by the CLR to execute the .net program.

JVM, . .class, java.exe. .class java-- , . .jar - zip .class . .jar java.exe, java.exe .jar - , .doc Word.

+1

. linux Java-, java-, java. CLR, , . Windows ( , Jar) , - " , .jar, java" .net .

-1
source

All Articles