A compiler is a computer program that translate written code (source code) into another computer language Associated with high level languages A well.

Download A compiler is a computer program that translate written code (source code) into another computer language Associated with high level languages A well.

Post on 17-Jan-2016

214 views

Category:

Documents

0 download

TRANSCRIPT

  • A compiler is a computer program that translate written code (source code) into another computer languageAssociated with high level languagesA well formed list of compilersCompiles Java source code into Java bytecodeTranslates all code at onceUsed with high level languages

  • In Java, the interpreter is a component of the Java JDK that runs Java bytecode classesAllows Java to be ran outside of a web browserTranslates code one line at a time and then executes the instruction immediatelyUsed with high level languages

  • Used with low level languagesBasically this translates the low level language to machine code (then the program can be executed)

  • You create a source document using an established protocol (in our case, the Java language).Then your program is run through a source code compiler. The source code compiler checks for errors and wont let you compile until its satisfied that everything will run correctly.The compiler creates a new document, coded into Java bytecode. Any device capable of running Java will be able to interpret/translate this file into something it can run. The compiled bytecode is platform independent.The Java Virtual Machine (JVM) translates the bytecode into something the underlying platform understands, and runs your program.

  • Usually have to be either interpreted, compiled, or translated (or some combination of all three)Easier to use than low level languagesLanguage is closer to spoken languagePortableAbstractExamples: Java, Visual Basic, ?, ? (lab assignment)

  • In a sense low level languages speak the same language as the hardwareUsually does not need a compiler or interpreter1st Generation: Machine Code2nd Generation: Assembly Language

Recommended

View more >