简体   繁体   中英

What is Non-Java code?

I was learning about JVM and met with this word which is stored in 'Java Native Stack' (a Runtime Data Area) during loading of .class file. Non Java code is also called Native code, but i really don't understand what is it.

Non-java code is code that was not coded in the Java programming language. There are actually two kinds:

  • Native code (eg written in C or C++) that implements Java methods that have been declared as native . Native code is typically compiled to the native instruction set of the hardware, assembled into a shared library / DLL and loaded by the JVM in response to a System method call.

  • JVM bytecodes that were produced by something other than a Java compiler. There are compilers for other languages such as Scala, Lua, Python, C#, etc that generate bytecodes for execution on the JVM platform.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM