View
219
Download
0
Category
Preview:
Citation preview
A compiler is a computer program that translate written code (source code) into another computer language
Associated with high level languages A well formed list of compilers Compiles Java source code into Java
bytecode Translates all code at once Used with high level languages
In Java, the interpreter is a component of the Java JDK that runs Java bytecode classes
Allows Java to be ran outside of a web browser
Translates code one line at a time and then executes the instruction immediately
Used with high level languages
Used with low level languages Basically this translates the low level
language to machine code (then the program can be executed)
1. You create a source document using an established protocol (in our case, the Java language).
2. Then your program is run through a source code compiler. The source code compiler checks for errors and won’t let you compile until it’s satisfied that everything will run correctly.
3. 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.
4. 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 languages Language is closer to spoken language
Portable Abstract Examples: Java, Visual Basic, ?, ? (lab
assignment)
In a sense low level languages speak the same language as the hardware
Usually does not need a compiler or interpreter
1st Generation: Machine Code 2nd Generation: Assembly Language
Recommended