What is native code

I think there is little bit confusion about what exactly native code is among you guys.

Let me clear this thing just a bit.

Simply native means using frameworks, libraries of the operating system, regardless any language or tools. One thing just to make sure in native code, user experience is 100% aligned with default OS device experience.

Native code means code that is translated into the native assembly code for the CPU. CPU’s don’t understand Java, C#, C++ etc. They only understand their own assembly language. Therefore all code must eventually be either translated (compiled) to assembly language, or be interpreted by an assembly language program.

For instance, C++ is compiled into native assembly code. Java is compiled into byte code, and the byte code is then interpreted by a Java Virtual Machine (JVM). The JVM is also compiled into assembly language. The JVM loads the Java byte code, and interprets it, and compiles parts of it into assembly language too.

Thanks my friend Jakob Jenkov for this explanation.


1 Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s