JAVA
"WRITE ONCE, RUN ANYWHERE”
Lec--1
By: Zubair Khalid
£ What is Java?
£ Features of Java?
£ Why it is platform independent?
£ What is JVM, JDK, JRE, IDE?
Java
£ Java is a programming language and platform
£ Released by sun microsystems in 1995
£ Lot of applications and websites don’t work
until you have installed java
£ Java is fast, secure & reliable
What is Java
1) Object Oriented
2) Compiled & Interpreted
3) Platform independent & portable
4) Distributed (java.net package for developing N/W
Applications)
5) Multi-threaded (java.lanq package contains thread
class)
6) Dynamic (C, C++ Native methods can be used)
7) Robust & Secure
Features of Java
£ Platform = hardware + operating system
E.G.: Dell + windows 8.1
£ In case of C or C++ (which are not platform independent)
compiler generate the .Exe file that is OS dependent so when we
run this .Exe file on another OS it will not run because this file is
OS dependent
What is Platform Independence?
JAVA COMPILATION AND
EXECUTION
₪ Each OS has separate JVM to read
Bytecode in its own way.
₪ Means that JVM depends on OS.
₪ If it does not, then there should be
only one JVM block in picture that
would be leading to every OS.
Java Code
(.java)
JAVA
Compile
r
Byte Code
(.Class)
JVM JVM JVM
Windows Linux Mac
How Java is Platform Independent
(OS Independent)
£ Stands for java runtime
environment
£ Implementation of JVM
£ Physically exists
£ Set of libraries + other files
Set of libraries
E.g. rt.jarJVM
Other files
What is JRE?
£ Stands for java
development kit
£ Full featured SDK for java
£ Includes JRE + compilers +
tools
£ Set of libraries + other
files
What is JDK?
Set of libraries
E.g. rt.jarJVM
Other files
Development Tools.
E.g. Javac.java etc.
JRE
Inside JVM
Machine Code
(0101001)
JAVA
Interpret
er
Byte Code
(.Class)
What is JVM?
Converts Byte Code into real
Machine code
Description of Java (Conceptual Diagram)
What is IDE?
£ Stands for integrated development
environment
£ Provides basic tools for writing and
testing
£ Consists of
£ Code Editor
£ Compiler or Interpreter
£ Debugger
Java IDE
£ Some of most famous Java IDE’s are
following
£ Eclipse
£ NetBeans
£ Android Studio

Java -lec-1

  • 1.
    JAVA "WRITE ONCE, RUNANYWHERE” Lec--1 By: Zubair Khalid
  • 2.
    £ What isJava? £ Features of Java? £ Why it is platform independent? £ What is JVM, JDK, JRE, IDE? Java
  • 3.
    £ Java isa programming language and platform £ Released by sun microsystems in 1995 £ Lot of applications and websites don’t work until you have installed java £ Java is fast, secure & reliable What is Java
  • 4.
    1) Object Oriented 2)Compiled & Interpreted 3) Platform independent & portable 4) Distributed (java.net package for developing N/W Applications) 5) Multi-threaded (java.lanq package contains thread class) 6) Dynamic (C, C++ Native methods can be used) 7) Robust & Secure Features of Java
  • 5.
    £ Platform =hardware + operating system E.G.: Dell + windows 8.1 £ In case of C or C++ (which are not platform independent) compiler generate the .Exe file that is OS dependent so when we run this .Exe file on another OS it will not run because this file is OS dependent What is Platform Independence?
  • 6.
    JAVA COMPILATION AND EXECUTION ₪Each OS has separate JVM to read Bytecode in its own way. ₪ Means that JVM depends on OS. ₪ If it does not, then there should be only one JVM block in picture that would be leading to every OS. Java Code (.java) JAVA Compile r Byte Code (.Class) JVM JVM JVM Windows Linux Mac How Java is Platform Independent (OS Independent)
  • 7.
    £ Stands forjava runtime environment £ Implementation of JVM £ Physically exists £ Set of libraries + other files Set of libraries E.g. rt.jarJVM Other files What is JRE?
  • 8.
    £ Stands forjava development kit £ Full featured SDK for java £ Includes JRE + compilers + tools £ Set of libraries + other files What is JDK? Set of libraries E.g. rt.jarJVM Other files Development Tools. E.g. Javac.java etc. JRE
  • 9.
    Inside JVM Machine Code (0101001) JAVA Interpret er ByteCode (.Class) What is JVM? Converts Byte Code into real Machine code
  • 10.
    Description of Java(Conceptual Diagram)
  • 11.
    What is IDE? £Stands for integrated development environment £ Provides basic tools for writing and testing £ Consists of £ Code Editor £ Compiler or Interpreter £ Debugger
  • 12.
    Java IDE £ Someof most famous Java IDE’s are following £ Eclipse £ NetBeans £ Android Studio