SlideShare a Scribd company logo
Introduction to JAVA
About Java
• Java is a powerful and versatile programming
language for developing software running on
mobile devices, desktop computers, and servers
• Developed by James Gosling in 1995
• Popular because of write a program once and run
it anywhere
• Java is a programming language and a platform
• Platform: Any hardware or software environment
in which a program runs, is known as a platform.
Since Java has a runtime environment (JRE) and
API, it is called a platform.
Types of Java Applications
• Four types of applications that can be created
using Java programming
– Standalone Application
– Web Application
– Enterprise Application
– Mobile Application
JDK Editions
• Java Standard Edition (Java SE)
• Java Enterprise Edition (Java EE)
• Java Micro Edition (Java ME)
JDK Versions
• History of JDK version
– https://en.wikipedia.org/wiki/Java_version_history
• Latest is Java SE 18 [Java SE 18]
• Download from:
– https://www.oracle.com/java/technologies/downloa
ds/#jdk18-windows
Installing Java
• To check if Java is installed (open command
prompt and type following command)
java –version
• Setting Java Path
– Temporary Path
• Open the command prompt
• Copy the path of the JDK/bin directory
• Write in command prompt: set path=copied_path
– Permanent Path using Environment Variables
Settings
Environment Variable
• Go to "System Properties" (Can be found on Control Panel
> System and Security > System > Advanced System
Settings)
• Click on the "Environment variables" button under the
"Advanced" tab
• Then, select the "Path" variable in System variables and
click on the "Edit" button
• Click on the "New" button and add the path where Java is
installed, followed by bin. By default, Java is installed in
C:Program FilesJavajdk-15bin
Then, click "OK", and save the settings
• At last, open Command Prompt (cmd.exe) and type java -
version to see if Java is running on your machine
Popular Java IDEs
• NetBeans
• Eclipse
• IntelliJ
JDK, JRE, and JVM
• Java Virtual Machine (JVM)
– Provides a platform-independent way of executing Java source
code
– JVM comes with JIT(Just-in-Time) compiler that converts Java
source code into low-level machine language
• Java Runtime Environment
– Set of software tools which are used for developing Java
applications
– Contains JVM
– JRE = JVM + rt.jar (lang, util, awt, swing, math packages)
• Java Development Tool kit (JDK)
– Software development environment which is used to develop
Java applications
– Physically exists
JDK, JRE, and JVM
Interpreting/Compiling Source Code
• A program written in a high-level language is
called a source program or source code
• A source program must be translated into
machine code for execution
Compiling Source Code
A compiler translates the entire source code into a
machine-code file, and the machine-code file is
then executed
Interpreting Source Code
An interpreter reads one statement from the
source code, translates it to the machine code or
virtual machine code, and then executes it right
away
Creating, Compiling, and
Running Programs
Java Program Phases
• Phase 1: Creating a Program
• Phase 2: Compiling a Java Program into Bytecodes
– Bytecodes are re-executed by the JVM
Java Program Phases
• Phase 3: Loading a Program into Memory
– JVM class loader takes the .class file (along with
associated class files provided by Java) and loads
in memory
Java Program Phases
• Phase 4: Bytecode Verification
– Java enforces strong security to make sure that Java
programs arriving over the network do not damage your
files or your system (as computer viruses and worms
might).
Java Program Phases
• Phase 5: Execution
– Interpreter
• JVM execute bytecode using interpreter (one bytecode at a time) which
slows execution
– Just In Time(JIT) Compiler
• JVM analyzes the bytecodes as they’re interpreted searching for hot
spots — parts of the bytecodes that execute frequently
• For these part JIT also known as Java HotSpot compiler
– Translates the bytecodes into the underlying computer’s machine language

More Related Content

PPTX
Introduction to java
PPSX
JAVA.ppsx java code java edv java development
DOCX
JAVA CORE
PDF
Java presentation
PDF
What is-java
PDF
What is java
PDF
Java - At a glance
PDF
TechSearchWeb Tutorials.pdf
Introduction to java
JAVA.ppsx java code java edv java development
JAVA CORE
Java presentation
What is-java
What is java
Java - At a glance
TechSearchWeb Tutorials.pdf

Similar to Lecture-2.pptx sensor design and signal processing using RF and THz sensing, specifically for physiological measurements. He is highly motiv (20)

PPTX
Introduction to java
PDF
Java Basic.pdf
PDF
TechSearchWeb.pdf
PDF
Technology Tutorial.pdf
PDF
Introduction java programming
PDF
JAVA BOOK BY SIVASANKARI
PPTX
Object Oriented Programming Part 1 of Unit 1
PDF
Ah java-ppt1
PPTX
1_Introduction to Java.pptx java programming
PDF
J introtojava1-pdf
PPTX
Java Programming Tutorials Basic to Advanced 1
PPTX
LLLecture-JAVAPROGRAMMINGBasics1.KI.pptx
PPTX
01. Introduction to programming with java
PDF
Basics of java
PPSX
Java Semimar Slide (Cetpa)
PPSX
Java Semimar Slide (Cetpa)
PPTX
java intro.pptx
PPTX
Java chapter 1 basic introduction Unit-1.pptx
PPT
Java2020 programming basics and fundamentals
PPT
J2ee strutswithhibernate-140121221332-phpapp01
Introduction to java
Java Basic.pdf
TechSearchWeb.pdf
Technology Tutorial.pdf
Introduction java programming
JAVA BOOK BY SIVASANKARI
Object Oriented Programming Part 1 of Unit 1
Ah java-ppt1
1_Introduction to Java.pptx java programming
J introtojava1-pdf
Java Programming Tutorials Basic to Advanced 1
LLLecture-JAVAPROGRAMMINGBasics1.KI.pptx
01. Introduction to programming with java
Basics of java
Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)
java intro.pptx
Java chapter 1 basic introduction Unit-1.pptx
Java2020 programming basics and fundamentals
J2ee strutswithhibernate-140121221332-phpapp01
Ad

Recently uploaded (20)

PPTX
cse couse aefrfrqewrbqwrgbqgvq2w3vqbvq23rbgw3rnw345
PPT
APPROACH TO DEVELOPMENTALlllllllllllllllll
PDF
Sales and Distribution Managemnjnfijient.pdf
PPTX
AREAS OF SPECIALIZATION AND CAREER OPPORTUNITIES FOR COMMUNICATORS AND JOURNA...
PPTX
Overview Planner of Soft Skills in a single ppt
PDF
Understanding the Rhetorical Situation Presentation in Blue Orange Muted Il_2...
PDF
Prostaglandin E2.pdf orthoodontics op kharbanda
PPTX
E-Commerce____Intermediate_Presentation.pptx
DOCX
How to Become a Criminal Profiler or Behavioural Analyst.docx
DOC
field study for teachers graduating samplr
PPTX
退学买新西兰毕业证(WelTec毕业证书)惠灵顿理工学院毕业证国外证书制作
PPTX
1751884730-Visual Basic -Unitj CS B.pptx
PPTX
The Stock at arrangement the stock and product.pptx
PPTX
Principles of Inheritance and variation class 12.pptx
PDF
Manager Resume for R, CL & Applying Online.pdf
PPTX
ESD MODULE-5hdbdhbdbdbdbbdbdbbdndbdbdbdbbdbd
PPTX
PMP (Project Management Professional) course prepares individuals
PPTX
Prokaryotes v Eukaryotes PowerPoint.pptx
PDF
Why Today’s Brands Need ORM & SEO Specialists More Than Ever.pdf
PPTX
chapter 3_bem.pptxKLJLKJLKJLKJKJKLJKJKJKHJH
cse couse aefrfrqewrbqwrgbqgvq2w3vqbvq23rbgw3rnw345
APPROACH TO DEVELOPMENTALlllllllllllllllll
Sales and Distribution Managemnjnfijient.pdf
AREAS OF SPECIALIZATION AND CAREER OPPORTUNITIES FOR COMMUNICATORS AND JOURNA...
Overview Planner of Soft Skills in a single ppt
Understanding the Rhetorical Situation Presentation in Blue Orange Muted Il_2...
Prostaglandin E2.pdf orthoodontics op kharbanda
E-Commerce____Intermediate_Presentation.pptx
How to Become a Criminal Profiler or Behavioural Analyst.docx
field study for teachers graduating samplr
退学买新西兰毕业证(WelTec毕业证书)惠灵顿理工学院毕业证国外证书制作
1751884730-Visual Basic -Unitj CS B.pptx
The Stock at arrangement the stock and product.pptx
Principles of Inheritance and variation class 12.pptx
Manager Resume for R, CL & Applying Online.pdf
ESD MODULE-5hdbdhbdbdbdbbdbdbbdndbdbdbdbbdbd
PMP (Project Management Professional) course prepares individuals
Prokaryotes v Eukaryotes PowerPoint.pptx
Why Today’s Brands Need ORM & SEO Specialists More Than Ever.pdf
chapter 3_bem.pptxKLJLKJLKJLKJKJKLJKJKJKHJH
Ad

Lecture-2.pptx sensor design and signal processing using RF and THz sensing, specifically for physiological measurements. He is highly motiv

  • 2. About Java • Java is a powerful and versatile programming language for developing software running on mobile devices, desktop computers, and servers • Developed by James Gosling in 1995 • Popular because of write a program once and run it anywhere • Java is a programming language and a platform • Platform: Any hardware or software environment in which a program runs, is known as a platform. Since Java has a runtime environment (JRE) and API, it is called a platform.
  • 3. Types of Java Applications • Four types of applications that can be created using Java programming – Standalone Application – Web Application – Enterprise Application – Mobile Application
  • 4. JDK Editions • Java Standard Edition (Java SE) • Java Enterprise Edition (Java EE) • Java Micro Edition (Java ME)
  • 5. JDK Versions • History of JDK version – https://en.wikipedia.org/wiki/Java_version_history • Latest is Java SE 18 [Java SE 18] • Download from: – https://www.oracle.com/java/technologies/downloa ds/#jdk18-windows
  • 6. Installing Java • To check if Java is installed (open command prompt and type following command) java –version • Setting Java Path – Temporary Path • Open the command prompt • Copy the path of the JDK/bin directory • Write in command prompt: set path=copied_path – Permanent Path using Environment Variables Settings
  • 7. Environment Variable • Go to "System Properties" (Can be found on Control Panel > System and Security > System > Advanced System Settings) • Click on the "Environment variables" button under the "Advanced" tab • Then, select the "Path" variable in System variables and click on the "Edit" button • Click on the "New" button and add the path where Java is installed, followed by bin. By default, Java is installed in C:Program FilesJavajdk-15bin Then, click "OK", and save the settings • At last, open Command Prompt (cmd.exe) and type java - version to see if Java is running on your machine
  • 8. Popular Java IDEs • NetBeans • Eclipse • IntelliJ
  • 9. JDK, JRE, and JVM • Java Virtual Machine (JVM) – Provides a platform-independent way of executing Java source code – JVM comes with JIT(Just-in-Time) compiler that converts Java source code into low-level machine language • Java Runtime Environment – Set of software tools which are used for developing Java applications – Contains JVM – JRE = JVM + rt.jar (lang, util, awt, swing, math packages) • Java Development Tool kit (JDK) – Software development environment which is used to develop Java applications – Physically exists
  • 11. Interpreting/Compiling Source Code • A program written in a high-level language is called a source program or source code • A source program must be translated into machine code for execution
  • 12. Compiling Source Code A compiler translates the entire source code into a machine-code file, and the machine-code file is then executed
  • 13. Interpreting Source Code An interpreter reads one statement from the source code, translates it to the machine code or virtual machine code, and then executes it right away
  • 15. Java Program Phases • Phase 1: Creating a Program • Phase 2: Compiling a Java Program into Bytecodes – Bytecodes are re-executed by the JVM
  • 16. Java Program Phases • Phase 3: Loading a Program into Memory – JVM class loader takes the .class file (along with associated class files provided by Java) and loads in memory
  • 17. Java Program Phases • Phase 4: Bytecode Verification – Java enforces strong security to make sure that Java programs arriving over the network do not damage your files or your system (as computer viruses and worms might).
  • 18. Java Program Phases • Phase 5: Execution – Interpreter • JVM execute bytecode using interpreter (one bytecode at a time) which slows execution – Just In Time(JIT) Compiler • JVM analyzes the bytecodes as they’re interpreted searching for hot spots — parts of the bytecodes that execute frequently • For these part JIT also known as Java HotSpot compiler – Translates the bytecodes into the underlying computer’s machine language