Is there a way to view the C code underlying Java? -
i know can view "source code" java on places grepcode, i'm looking way view c code java built on top of. feel question must have been asked many times, haven't been able find satisfactory answer.
this not explicit purpose - want understand how programming language "built" little bit better.
also, if show how view bytecode generated, too.
oracle's official jdk 7 based on code the openjdk project, can download link. there's jdk 8 branch available same site.
the java virtual machine (jvm) sort of imaginary computer executes *.class
files. of time, jvm emulated program written in other language (like c++) runs on real computer. when run java program on windows machine, example, program java.exe
written largely in c++, pretends jvm, , executes *.class
files. java code like
++i;
gets translated java compiler (which written in java!) jvm opcode like
iinc 0 1
the jvm contains code (written in c++, or assembly) handle instruction -- , hundreds of additional instructions -- if opcode in real machine language. in truth, it's more complicated: modern jvms translate jvm opcodes platform-specific machine code while they're running, code translation of course written in native (non-java) language c++ or assembly.
there lots of articles on interwebs explain stuff well: here's nice one.
Comments
Post a Comment