Presentation is loading. Please wait.

Presentation is loading. Please wait.

By: Cheryl Mok & Sarah Tan. Java is partially interpreted. 1. Programmer writes a program in textual form 2. Runs the compiler, which converts the textual.

Similar presentations


Presentation on theme: "By: Cheryl Mok & Sarah Tan. Java is partially interpreted. 1. Programmer writes a program in textual form 2. Runs the compiler, which converts the textual."— Presentation transcript:

1 By: Cheryl Mok & Sarah Tan

2

3 Java is partially interpreted. 1. Programmer writes a program in textual form 2. Runs the compiler, which converts the textual form into byte-code (an intermediate language) 3. The byte-code file is then run over an interpreter, which executes the native machine code instructions corresponding to each instruction in byte-code.

4 Java is system independent since it is partially interpreted. The compiled byte-code is transferable to any system with a byte-code interpreter.

5 Java Virtual Machine responsible for interpreting Java bytecode translating this into actions or operating system calls Examples: a request to establish a socket connection to a remote machine will involve an operating system call. Different operating systems handle sockets in different ways - but the programmer doesn't need to worry about such details. the responsibility of the JVM to handle those translations, so that the operating system and CPU architecture on which Java software is running is completely irrelevant to the developer.

6  The.class files generated by the compiler are not executable binaries  so Java combines compilation and interpretation  Instead, they contain “byte-codes” to be executed by the Java Virtual Machine  other languages have done this, e.g. UCSD Pascal  This approach provides platform independence, and greater security


Download ppt "By: Cheryl Mok & Sarah Tan. Java is partially interpreted. 1. Programmer writes a program in textual form 2. Runs the compiler, which converts the textual."

Similar presentations


Ads by Google