History
Was created in 1991
James Gosling et al. of Suns Microsystems
Initially called Oak, in honor of the oak tree, but there is an Oak language so its was changed into Java
Original motivation was need for platform independent language that could be embed in various consumer electronic products
Star7 – a personal hand-held remote, first project developed with java.
Java Technology
1. A programming language – can create all kinds of applications that you could create using any conventional programming language.
2. A Development environment – large suits of tools
a. Compiler
b. Interpreter
c. Documentation generator
d. A class file packaging tool
3. An Application and run-time environment – general purpose program that run n any machine where the java run time environment (JRE) is installed.
Java Features
1. Java Virtual machine
a. Java Virtual Machine – an imaginary machine that is implemented by emulating software on a real machine
b. Bytecode – a special machine language that can be understood by the JVM.
2. Garbage Collection Thread – responsible for freeing any memory that can be freed.
3. Code Security – is attained in Java through the implementation of its java Runtime Environment. JRE runs code compiled for a JVM and perform class loading, code verification, and final code execution.
a. Class loader – responsible for loading all classes needed for the java program
b. Bytecode verifier – test the format of code fragments and checks the code fragments for illegal code that can violate access rights to objects
Phases of Java Program
Editor –> Hello.java –> Java Compiler –> Hello.class –> java Interpreter
1. Write the Program – any text editor – file with .java extension.
2. Compile the Program – Java Compiler – file with .class extension.
3. Run the Program – java interpreter – Program Output
Lesson 2 – Programming Environment
Console – this is where you type in commands. Linux, Mac, Command prompt