Developing Programs in Java
An Introduction
|
Prof. David Bernstein
James Madison University
|
|
Computer Science Department
|
bernstdh@jmu.edu
|
Compiled Languages (e.g., C)
Tools:
- Editor: Create one or more source files
- Containing the program in human-readable form
- Compiler: Convert the source files to object files
- Containing the machine instructions
- Linker: Combine all of the pieces into an executable
- Containing application code and library code
Important Points:
- These steps are performed "once"
- Executables are machine and OS specific
Interpreted Languages (e.g., Python, ECMAscript)
Tools:
- Editor: Create one or more source files
- Containing the program in human-readable form
- Interpreter: Execute the source file
- Each operation in the source file is "converted to" machine
instructions each time it is encountered
Important Points:
- Editing is performed "once"
- Interpreting is performed every time the program is executed
- The interpreter is machine and OS specific
Hybrid Languages (e.g., Java)
Tools:
- Editor: Create one or more source files
- Containing the program in human-readable form
- Compiler: Convert the source files to
intermediate files (e.g.,
.class
files)
- Containing byte codes that are similar to
machine instructions but not specific to a machine/OS
(hence are often said to be for
a virtual machine)
- Interpreter: Execute the byte codes
- Convert the byte codes to machine instructions (either
up-front or "just-in-time")
Important Points:
- Editing and compiling is done "once"
- The interpreter is used every execution
- The interpreter is machine and OS specific
There's Always More to Learn