Presentation is loading. Please wait.

Presentation is loading. Please wait.

Before You Begin Nahla Abuel-ola /WIT.

Similar presentations


Presentation on theme: "Before You Begin Nahla Abuel-ola /WIT."— Presentation transcript:

1 Before You Begin Nahla Abuel-ola /WIT

2 Java platform overview
1. The Java language 2. The Java compiler 3. The JVM 4. The garbage collector 5. The Java Development Kit 6. The Java Runtime Environment Nahla Abuel-ola /WIT

3 1. The Java Language Like any programming language, the Java language has its own structure, syntax rules, and programming paradigm. The Java language's programming paradigm is based on the concept of object-oriented programming (OOP). Java’s syntax rules look much like C's. For example: code blocks are modularized into methods and delimited by braces { } Variables are declared before they are used. Java language starts with packages. Within packages are classes, and within classes are methods, variables, constants, and more. Nahla Abuel-ola /WIT

4 2. The Java Compiler .Java File: When you program for the Java platform, you write source code in .java files and then compile them. .Class File: The compiler checks your code against the language's syntax rules, then writes out bytecode in .class files. JVM: Bytecode is a set of instructions targeted to run on a Java virtual machine (JVM). The Java compiler differs from other language compilers, which write out assembly-language instructions suitable for the CPU chipset the program will run on. Nahla Abuel-ola /WIT

5 3. JVM (Java Virtual Machine)
At runtime, the JVM reads and interprets .class files and executes the program's instructions. The JVM is the heart of the Java language's "write-once, run-anywhere" principle. Your code can run on any chipset for which a suitable JVM implementation is available. JVMs are available for major platforms like Linux and Windows, and subsets of the Java language have been implemented in JVMs for mobile phones and hobbyist chips. Nahla Abuel-ola /WIT

6 4. The Garbage Collector The Java platform provides memory management.
When your Java application creates an object instance at runtime, the JVM automatically allocates memory space for that object. The Java garbage collector runs in the background, keeping track of which objects the application no longer needs and reclaiming memory from them. This approach to memory handling is called implicit memory management because it doesn't require you to write any memory- handling code. Garbage collection is one of the essential features of Java platform performance. Nahla Abuel-ola /WIT

7 5. The Java Development Kit
When you download a Java Development Kit (JDK), you get — in addition to the compiler and other tools — a complete class library of prebuilt utilities that help you accomplish most common application- development tasks. The best way to get an idea of the scope of the JDK packages and libraries is to check out the official online Java API documentation— also called the Javadoc. Nahla Abuel-ola /WIT

8 Nahla Abuel-ola /WIT

9 6. The Java Runtime Environment
The Java Runtime Environment (JRE; also known as the Java runtime) includes the JVM, code libraries, and components that are necessary for running programs that are written in the Java language. Nahla Abuel-ola /WIT

10 The Code life Cycle!! Edit  compile  run
In the Java programming language, all source code is first written in plain text files ending with the .java extension. Those source files are then compiled into .class files by the javac compiler. A .class file does not contain code that is native to your processor; it instead contains bytecodes — the machine language of the Java Virtual Machine1 (Java VM). The java launcher tool then runs your application with an instance of the Java Virtual Machine. An overview of the software development process. Nahla Abuel-ola /WIT


Download ppt "Before You Begin Nahla Abuel-ola /WIT."

Similar presentations


Ads by Google