Monday 7 November 2011

in JAVA , deal with interpreter ... after compilation ....

thanx to god that , i have internet because without internet i am a worth element in this world . and thanx to SUN MICROSYSTEM that are in this world for helping all java lovers and they are like my parents and greater than my parents . 


now i have to deal with my topic . dealing with interpreter after compilation . but what is the meaning of this topic . it means that when we compile our program we convert it into machine understanding language . now in JVM , jvm will come in game and its work starts that it will load the class ... this takes too much text because it has too much data behind the loading , now i have to introduce the topic that how interpreter comes in sun-light . what you have compiled will be send to jvm to interpret because at jvm , jvm will also understand the byte-code . 


take a example :--


generally make a program ... name it as " compile.java"


:-- compile it using **javac compile.java** 
    { here you had converted your code into byte-code }


:-- now generally we include **java compiler**
    { here our all byte-code is understand by the help of JIT-  compiler means the term **java compiler** is used for jit compiler . here out code is treated as whole page . but if you want to understand it by line by line than remove **java compiler** from your cmd screen and include 
     
        **java -Djava.compiler= "" compiler{program name}**
        " " you can pass any name inside it . { but why still i am searching for it " .


{ try this in your machine because i love it , and i think you will also love it } 


...in java when we write **javac file_name.java** {compilation} & **java file_name** {JIT compilater means still compiler to understand byte code } .. 
means compilation + use of compiler { but if you want to use interpreter }.


for this you have to include **javac file_name.java** {compilation} & **java -Djava.compiler =" "file_name **{ means now we have removed jit compiler and we are dealing with interpreter }...

No comments: