SlideShare a Scribd company logo
Page 0Classification: Restricted
Java & JEE Training
Session 1 - Introduction to Java
Page 1Classification: Restricted
MindsMapped Training Resources
• Java Training Details
• Knowledge Base
Page 2Classification: Restricted
Agenda
• History of Java – A Programmer’s Perspective
• Salient Features of Java
• Major Java Editions
Page 3Classification: Restricted
Ice Breaking…
• Expectation setting…
• Bird’s eye view of the training…
Page 4Classification: Restricted
Introduction to Java
Page 5Classification: Restricted
European Agricultural Revolution: 1700 onwards
Page 6Classification: Restricted
Industrial Revolution
Page 7Classification: Restricted
Evolution of Computer Science – initially based on mechanical systems
Page 8Classification: Restricted
A point to ponder…
• What led to the evolution of electronic computation systems?
More specifically… When we already had mechanical computing
machines and calculators, what made us base the modern computing
systems on electronics?
Page 9Classification: Restricted
A point to ponder…
• What led to the evolution of electronic computation systems?
More specifically… When we already had mechanical computing
machines and calculators, what made us base the modern computing
systems on electronics?
• Switching speed.
• Wear and tear.
Page 10Classification: Restricted
Building Blocks of a Basic Modern Computer System
• Based on von Neumann architecture
• John von Neumann was a Hungarian computer scientist.
2
Page 11Classification: Restricted
A point to ponder…
• Ok, so the CPU is the brain of the computer system. Then why do I need an
OS?
Page 12Classification: Restricted
A point to ponder…
• Ok, so the CPU is the brain of the computer system. Then why do I need an
OS?
• Communicating with the CPU using its instruction set is cumbersome, it is
difficult. We need an interpreter.
Page 13Classification: Restricted
A point to ponder…
• Ok, an OS is the interface between the user and the CPU. Then why would I
need a programming language?
Page 14Classification: Restricted
A point to ponder…
• Ok, an OS is the interface between the user and the CPU. Then why would I
need a programming language?
• How would you add functionalities to the software that is not already
available in an OS?
Page 15Classification: Restricted
A point to ponder…
• Ok, agreed I would need a programming language. Now, that we already
had other languages like C for Procedural Programming, C++ for Object
Oriented Programming, why did we have to write another language like
Java?
Page 16Classification: Restricted
A point to ponder…
• Ok, agreed I would need a programming language. Now, that we already
had other languages like C for procedural programming, C++ for Object
Oriented Programming, why did we have to write another language like
Java?
• Necessity is the mother of invention. There is a business intent behind this
invention too. But, what is that requirement?
Page 17Classification: Restricted
The Compilation Process for Non-Java Programs (like C & C++)
Source Code
(programming
language
instructions)
Object Code
(binary
instructions)
Programmers write
this.
Computers run this.
Compilers
compile source
code into object
code.
Page 18Classification: Restricted
History of Java
• In the early 1990's, putting intelligence into home appliances was thought
to be the next "hot" technology.
• Examples of intelligent home appliances:
• Coffee pots and lights that can be controlled by a computer's programs.
• Televisions that can be controlled by an interactive television device's
programs.
• Anticipating a strong market for such things, Sun Microsystems in 1991
funded a research project (code named Green) whose goal was to develop
software for intelligent home appliances.
• An intelligent home appliance's intelligence comes from its embedded
processor chips and the software that runs on the processor chips.
• Appliance processor chips change often because engineers continually find
ways to make them smaller, less expensive, and more powerful.
• To handle the frequent turnover of new chips, appliance software must be
extremely portable.
Page 19Classification: Restricted
The Issue of Portability
• A piece of software is portable if it can be used on many different types of
computers.
• Object code is not very portable. As you know, object code is comprised of
binary-format instructions. Those binary-format instructions are intimately
tied to a particular type of computer. If you've got object code that was
created on a type X computer, then the object code can run only on a type
X computer.
• The Java solution to improve portability:
• Java compilers don't compile all the way down to object code. Instead,
they compile down to bytecode, which possesses the best features of
both object code and source code:
• Like object code, bytecode uses a format that works closely with
computer hardware, so it runs fast.
• Like source code, bytecode is generic, so it can be run on any type of
computer.
Page 20Classification: Restricted
The Compilation Process for Java Programs
Java source
code
object code
Java compilers
compile source code
into bytecode.
bytecode
When a Java program is
run, the JVM translates
bytecode to object code.
Page 21Classification: Restricted
Java Virtual Machine
• How can bytecode be run on any type of computer?
• As a Java program’s bytecode runs, the bytecode is translated into object
code by the computer's bytecode interpreter program. The bytecode
interpreter program is known as the Java Virtual Machine, or JVM for short.
The JVM is written specifically for every platform.
Page 22Classification: Restricted
Issue of Portability Solved.. But..
• Originally, Sun planned to use C++ for its home appliance software, but
they soon realized that C++ was less than ideal because it wasn't portable
enough and it relied too heavily on hard-to-maintain things called pointers.
• Thus, rather than write C++ software and fight C++'s inherent deficiencies,
Sun decided to develop a whole new programming language to handle its
home appliance software needs.
• Their new language was originally named Oak (for the tree that was outside
project leader James Gosling's window), but it was soon changed to Java.
• When the home appliance software work dried up, Java almost died before
being released.
• Fortunately for Java, the World Wide Web exploded in popularity and Sun
realized it could capitalize on that.
Page 23Classification: Restricted
Issue of Portability Solved.. But..
• Web pages have to be very portable because they can be downloaded onto
any type of computer.
• What's the standard language used for Web pages?
• Java programs are very portable and they're better than HTML in terms of
providing user interaction capabilities.
• Java programs that are embedded in Web pages are called applets.
• Although applets still play a significant role in Java's current success, some
of the other types of Java programs have surpassed applets in terms of
popularity.
• In this course, we cover Standard Edition (SE) Java applications. They are
Java programs that run on a standard computer – a desktop or a laptop,
without the need of the Internet.
19
Page 24Classification: Restricted
Features Of Java
• Simple
• Similar to C and C++, but without the demerits…
• Omits operator overloading, multiple inheritance
• Goto statement is eliminated
• Header files are eliminated
• No concept of pointers
• Automatic Garbage collection
• A rich set of predefined classes
Page 25Classification: Restricted
Features Of Java
• Object-Oriented
• Forces the programmer to use the classes and object
• Class
• Member variables( data ) and member functions ( methods )
Page 26Classification: Restricted
Features Of Java
• Robust
• designed for writing highly reliable or robust software:
• automatic garbage collection, which prevents memory leaks
• Type safety of data
• Extensive compile time and runtime checking
• Object Oriented Exception Handling of run time errors
• Divide by zero exception.
Page 27Classification: Restricted
Features Of Java
• Architectural Neutral and Interpreted
• compiler generates bytecodes
• Easy to interpret on any machine
• “Write once and run anywhere WORA”
Page 28Classification: Restricted
Features Of Java
• Powerful
• Networking
• Threads
• Distributed Objects
• Database Access
• Graphics
• Data structure library
• Serialization
• Digital Signatures
Page 29Classification: Restricted
Features Of Java
• Java is Popular
Page 30Classification: Restricted
Features Of Java
• Distributed
• Supports TCP/IP
• Remote Method
• Invocation (RMI)
• Web Services
Page 31Classification: Restricted
Features of Java
• Multi-Threaded
• Parallel processing to improve the performance of certain types of
programs
Page 32Classification: Restricted
Major Java Editions
Page 33Classification: Restricted
Setting up environment for
Java Development
MindsMapped Consulting
Page 34Classification: Restricted
Steps for Environment Setup
1. Download and install latest JDK from Oracle site
2. Download and install Eclipse
Page 35Classification: Restricted
Download latest JDK from Oracle site
• "JDK" or "JRE"?
JRE (Java Runtime) is needed for running Java programs. JDK (Java
Development Kit), which includes JRE plus the development tools (such as
compiler and debugger), is need for writing as well as running Java
programs. Since you are supposed to write Java Programs, you should
install JDK, which includes JRE.
• To download and install JDK follow the steps in the following slides.
Page 36Classification: Restricted
Download latest JDK from Oracle site – Step 0
Step 0: Un-Install Older Version(s) of JDK/JRE
• I recommend that you install only the latest JDK. Although you can install
multiple versions of JDK concurrently, it is messy.
• If you have previously installed older version(s) of JDK/JRE, un-install ALL of
them. Goto "Control Panel" ⇒ "Program and Features" ⇒ Un-install ALL
programs begin with "Java", such as "Java SE Development Kit ...", "Java SE
Runtime ...", and etc.
Page 37Classification: Restricted
Download latest JDK from Oracle site – Step 1
Step 1: Download JDK
1. Goto Java SE download site @
http://www.oracle.com/technetwork/java/javase/downloads/index.html
2. Under "Java Platform, Standard Edition" ⇒ "Java SE 8u{xx}", where {xx} is
the latest update number ⇒ Click the "JDK Download" button.
3. Check "Accept License Agreement".
4. Choose your operating platform, e.g., "Windows x64" (for 64-bit
Windows OS) or "Windows x86" (for 32-bit Windows OS). You can check
whether your Windows OS is 32-bit or 64-bit via "Control Panel" ⇒
"System" ⇒ Under "System Type".
Page 38Classification: Restricted
Download latest JDK from Oracle site – Step 2
Step 2: Install JDK and JRE
1. Run the downloaded installer (e.g., "jdk-8u{xx}-windows-x64.exe"),
which installs both the JDK and JRE. By default, the JDK will be installed
in directory "C:Program FilesJavajdk1.8.0_xx", where xx denotes the
latest upgrade number; and JRE in "C:Program FilesJavajre1.8.0_xx".
2. For novices, accept the defaults. Follow the screen instructions to install
JDK and JRE.
3. Check the JDK installed directory by inspecting these folders using File
Explorer. Take note of your JDK installed directory, which you will need
in the next step.
4. I shall refer to the installation directory as <JAVA_HOME>
Page 39Classification: Restricted
Download latest JDK from Oracle site – Step 3
Step 3: Include JDK's "bin" Directory in the PATH
Windows OS searches the current directory and the directories listed in the PATH environment
variable for executable programs. JDK's programs (such as Java compiler javac.exe and Java
runtime java.exe) reside in directory "<JAVA_HOME>bin" (where <JAVA_HOME> denotes the
JDK installed directory). You need to include "<JAVA_HOME>bin" in the PATH to run the JDK
programs.
To edit the PATH environment variable in Windows XP/Vista/7/8/10:
1. Launch "Control Panel" ⇒ "System" ⇒ Click "Advanced system settings".
2. Switch to "Advanced" tab ⇒ "Environment Variables".
3. Under "System Variables", scroll down to select "Path" ⇒ "Edit...".
4. (CAUTION: Read this paragraph 3 times before doing this step! There is no UNDO)
For Windows 10: You see a table listing the existing PATH entries. Click "New" ⇒ Enter the JDK's
binary directory "c:Program FilesJavajdk1.8.0_xxbin" (Replace xx with your installation's
upgrade number!!!) ⇒ Select "Move Up" to move it all the way to the top.
Prior to Windows 10: In "Variable value" field, INSERT "c:Program FilesJavajdk1.8.0_xxbin"
(Replace xx with your installation upgrade number!!!) IN FRONT of all the existing directories,
followed by a semi-colon (;) which separates the JDK's binary directory from the rest of the
existing directories. DO NOT DELETE any existing entries; otherwise, some existing applications
may not run.
Page 40Classification: Restricted
Download latest JDK from Oracle site – Step 4
Step 4: Verify the JDK Installation
Launch a CMD shell (Click "Start" button ⇒ run... ⇒ enter "cmd"; OR from "Start" button ⇒ All
Programs ⇒ Accessories ⇒ Command Prompt).
• Issue "path" command to list the contents of the PATH environment variable. Check to make
sure that your <JAVA_HOME>bin is listed in the PATH.
// Display the PATH entries
prompt> path
PATH=c:Program FilesJavajdk1.8.0_xxbin;[other entries...]
Don't type prompt>, which denotes the command prompt!!! Key in the command (highlighted)
only.
• Issue the following commands to verify that JDK/JRE are properly installed and display their
version:
// Display the JRE version
prompt> java -version
java version "1.8.0_xx"
Java(TM) SE Runtime Environment (build 1.8.0_xx-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
// Display the JDK version
prompt> javac -version
javac 1.8.0_xx
Page 41Classification: Restricted
Download and Install Eclipse
• Download Eclipse from:
http://www.eclipse.org/downloads/packages/release/Neon/2
* Neon is the latest Eclipse release as of today. You can download the
latest Eclipse release.
• To install, all you have to do is extract the zip folder.
• While starting Eclipse, choose a workspace to store all your project files.
• Once Eclipse is launched, point it to the JDK you installed earlier
Preferences -> Java -> Installed JRE's
Page 42Classification: Restricted
Topics to be covered in next session
• Principles of Object Oriented Programming
• Writing your first Java Application
• Elements of Java programming language
• Built in Data Types
• Conditional Statements
• Loops
Page 43Classification: Restricted
Thank you!

More Related Content

What's hot

Elements of Java Language
Elements of Java Language Elements of Java Language
Elements of Java Language
Hitesh-Java
 
Java - OOPS and Java Basics
Java - OOPS and Java BasicsJava - OOPS and Java Basics
Java - OOPS and Java Basics
Victer Paul
 
Core java lessons
Core java lessonsCore java lessons
Core java lessons
vivek shah
 
java training in jaipur|java training|core java training|java training compa...
 java training in jaipur|java training|core java training|java training compa... java training in jaipur|java training|core java training|java training compa...
java training in jaipur|java training|core java training|java training compa...
infojaipurinfo Jaipur
 
Core Java
Core JavaCore Java
Core Java
Priyanka Pradhan
 
Practical OOP In Java
Practical OOP In JavaPractical OOP In Java
Practical OOP In Java
wiradikusuma
 
Core java
Core javaCore java
Core java
Shivaraj R
 
Core Java
Core JavaCore Java
Core Java
Prakash Dimmita
 
Java object oriented programming concepts - Brainsmartlabs
Java object oriented programming concepts - BrainsmartlabsJava object oriented programming concepts - Brainsmartlabs
Java object oriented programming concepts - Brainsmartlabs
brainsmartlabsedu
 
Object oriented concepts with java
Object oriented concepts with javaObject oriented concepts with java
Object oriented concepts with java
ishmecse13
 
Java Starting
Java StartingJava Starting
Java Starting
Raja Sekhar
 
JAVA PROGRAMMING
JAVA PROGRAMMING JAVA PROGRAMMING
JAVA PROGRAMMING
Niyitegekabilly
 
Basic Java Programming
Basic Java ProgrammingBasic Java Programming
Basic Java Programming
Math-Circle
 
OOP in Java
OOP in JavaOOP in Java
OOP in Java
wiradikusuma
 
Java for C++ programers
Java for C++ programersJava for C++ programers
Java for C++ programers
Salahaddin University-Erbil
 
Java OOP s concepts and buzzwords
Java OOP s concepts and buzzwordsJava OOP s concepts and buzzwords
Java OOP s concepts and buzzwords
Raja Sekhar
 
Session 05 - Strings in Java
Session 05 - Strings in JavaSession 05 - Strings in Java
Session 05 - Strings in Java
PawanMM
 

What's hot (17)

Elements of Java Language
Elements of Java Language Elements of Java Language
Elements of Java Language
 
Java - OOPS and Java Basics
Java - OOPS and Java BasicsJava - OOPS and Java Basics
Java - OOPS and Java Basics
 
Core java lessons
Core java lessonsCore java lessons
Core java lessons
 
java training in jaipur|java training|core java training|java training compa...
 java training in jaipur|java training|core java training|java training compa... java training in jaipur|java training|core java training|java training compa...
java training in jaipur|java training|core java training|java training compa...
 
Core Java
Core JavaCore Java
Core Java
 
Practical OOP In Java
Practical OOP In JavaPractical OOP In Java
Practical OOP In Java
 
Core java
Core javaCore java
Core java
 
Core Java
Core JavaCore Java
Core Java
 
Java object oriented programming concepts - Brainsmartlabs
Java object oriented programming concepts - BrainsmartlabsJava object oriented programming concepts - Brainsmartlabs
Java object oriented programming concepts - Brainsmartlabs
 
Object oriented concepts with java
Object oriented concepts with javaObject oriented concepts with java
Object oriented concepts with java
 
Java Starting
Java StartingJava Starting
Java Starting
 
JAVA PROGRAMMING
JAVA PROGRAMMING JAVA PROGRAMMING
JAVA PROGRAMMING
 
Basic Java Programming
Basic Java ProgrammingBasic Java Programming
Basic Java Programming
 
OOP in Java
OOP in JavaOOP in Java
OOP in Java
 
Java for C++ programers
Java for C++ programersJava for C++ programers
Java for C++ programers
 
Java OOP s concepts and buzzwords
Java OOP s concepts and buzzwordsJava OOP s concepts and buzzwords
Java OOP s concepts and buzzwords
 
Session 05 - Strings in Java
Session 05 - Strings in JavaSession 05 - Strings in Java
Session 05 - Strings in Java
 

Similar to Session 01 - Introduction to Java

Introduction to Java
Introduction to Java Introduction to Java
Introduction to Java
Hitesh-Java
 
Introduction to Java Part-2
Introduction to Java Part-2Introduction to Java Part-2
Introduction to Java Part-2
RatnaJava
 
Lecture-01 _Java Introduction CS 441 Fast
Lecture-01 _Java Introduction CS 441 FastLecture-01 _Java Introduction CS 441 Fast
Lecture-01 _Java Introduction CS 441 Fast
UzairSaeed18
 
Java Introduction
Java IntroductionJava Introduction
Java Introduction
sunmitraeducation
 
Chapter-1 Introduction.pptx
Chapter-1 Introduction.pptxChapter-1 Introduction.pptx
Chapter-1 Introduction.pptx
SumanBhandari40
 
1.Intro--Why Java.pptx
1.Intro--Why Java.pptx1.Intro--Why Java.pptx
1.Intro--Why Java.pptx
YounasKhan542109
 
Lec 1-of-oop2
Lec 1-of-oop2Lec 1-of-oop2
Lec 1-of-oop2
SM Rasel
 
Introduction to java and it's opportunities
Introduction to java and it's opportunities Introduction to java and it's opportunities
Introduction to java and it's opportunities
VigneshManikandan11
 
java full 1.docx
java full 1.docxjava full 1.docx
java full 1.docx
SATHYAKALAKSKPRCASBS
 
java full.docx
java full.docxjava full.docx
java full.docx
SATHYAKALAKSKPRCASBS
 
java completed units.docx
java completed units.docxjava completed units.docx
java completed units.docx
SATHYAKALAKSKPRCASBS
 
The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...
The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...
The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...
NRB
 
JavaClassPresentation
JavaClassPresentationJavaClassPresentation
JavaClassPresentation
juliasceasor
 
java full 1 (Recovered).docx
java full 1 (Recovered).docxjava full 1 (Recovered).docx
java full 1 (Recovered).docx
SATHYAKALAKSKPRCASBS
 
SSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJSSSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJS
Eugene Lazutkin
 
Java (1)
Java (1)Java (1)
Java (1)
Samraiz Tejani
 
01 java intro
01 java intro01 java intro
01 java intro
Deepal Shah
 
Lessons learned from building Eclipse-based add-ons for commercial modeling t...
Lessons learned from building Eclipse-based add-ons for commercial modeling t...Lessons learned from building Eclipse-based add-ons for commercial modeling t...
Lessons learned from building Eclipse-based add-ons for commercial modeling t...
IncQuery Labs
 
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
RajeshSukte1
 
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
CDSukte
 

Similar to Session 01 - Introduction to Java (20)

Introduction to Java
Introduction to Java Introduction to Java
Introduction to Java
 
Introduction to Java Part-2
Introduction to Java Part-2Introduction to Java Part-2
Introduction to Java Part-2
 
Lecture-01 _Java Introduction CS 441 Fast
Lecture-01 _Java Introduction CS 441 FastLecture-01 _Java Introduction CS 441 Fast
Lecture-01 _Java Introduction CS 441 Fast
 
Java Introduction
Java IntroductionJava Introduction
Java Introduction
 
Chapter-1 Introduction.pptx
Chapter-1 Introduction.pptxChapter-1 Introduction.pptx
Chapter-1 Introduction.pptx
 
1.Intro--Why Java.pptx
1.Intro--Why Java.pptx1.Intro--Why Java.pptx
1.Intro--Why Java.pptx
 
Lec 1-of-oop2
Lec 1-of-oop2Lec 1-of-oop2
Lec 1-of-oop2
 
Introduction to java and it's opportunities
Introduction to java and it's opportunities Introduction to java and it's opportunities
Introduction to java and it's opportunities
 
java full 1.docx
java full 1.docxjava full 1.docx
java full 1.docx
 
java full.docx
java full.docxjava full.docx
java full.docx
 
java completed units.docx
java completed units.docxjava completed units.docx
java completed units.docx
 
The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...
The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...
The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...
 
JavaClassPresentation
JavaClassPresentationJavaClassPresentation
JavaClassPresentation
 
java full 1 (Recovered).docx
java full 1 (Recovered).docxjava full 1 (Recovered).docx
java full 1 (Recovered).docx
 
SSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJSSSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJS
 
Java (1)
Java (1)Java (1)
Java (1)
 
01 java intro
01 java intro01 java intro
01 java intro
 
Lessons learned from building Eclipse-based add-ons for commercial modeling t...
Lessons learned from building Eclipse-based add-ons for commercial modeling t...Lessons learned from building Eclipse-based add-ons for commercial modeling t...
Lessons learned from building Eclipse-based add-ons for commercial modeling t...
 
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
 
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
 

More from PawanMM

Session 48 - JS, JSON and AJAX
Session 48 - JS, JSON and AJAXSession 48 - JS, JSON and AJAX
Session 48 - JS, JSON and AJAX
PawanMM
 
Session 46 - Spring - Part 4 - Spring MVC
Session 46 - Spring - Part 4 - Spring MVCSession 46 - Spring - Part 4 - Spring MVC
Session 46 - Spring - Part 4 - Spring MVC
PawanMM
 
Session 45 - Spring - Part 3 - AOP
Session 45 - Spring - Part 3 - AOPSession 45 - Spring - Part 3 - AOP
Session 45 - Spring - Part 3 - AOP
PawanMM
 
Session 44 - Spring - Part 2 - Autowiring, Annotations, Java based Configuration
Session 44 - Spring - Part 2 - Autowiring, Annotations, Java based ConfigurationSession 44 - Spring - Part 2 - Autowiring, Annotations, Java based Configuration
Session 44 - Spring - Part 2 - Autowiring, Annotations, Java based Configuration
PawanMM
 
Session 43 - Spring - Part 1 - IoC DI Beans
Session 43 - Spring - Part 1 - IoC DI BeansSession 43 - Spring - Part 1 - IoC DI Beans
Session 43 - Spring - Part 1 - IoC DI Beans
PawanMM
 
Session 42 - Struts 2 Hibernate Integration
Session 42 - Struts 2 Hibernate IntegrationSession 42 - Struts 2 Hibernate Integration
Session 42 - Struts 2 Hibernate Integration
PawanMM
 
Session 41 - Struts 2 Introduction
Session 41 - Struts 2 IntroductionSession 41 - Struts 2 Introduction
Session 41 - Struts 2 Introduction
PawanMM
 
Session 40 - Hibernate - Part 2
Session 40 - Hibernate - Part 2Session 40 - Hibernate - Part 2
Session 40 - Hibernate - Part 2
PawanMM
 
Session 39 - Hibernate - Part 1
Session 39 - Hibernate - Part 1Session 39 - Hibernate - Part 1
Session 39 - Hibernate - Part 1
PawanMM
 
Session 38 - Core Java (New Features) - Part 1
Session 38 - Core Java (New Features) - Part 1Session 38 - Core Java (New Features) - Part 1
Session 38 - Core Java (New Features) - Part 1
PawanMM
 
Session 37 - JSP - Part 2 (final)
Session 37 - JSP - Part 2 (final)Session 37 - JSP - Part 2 (final)
Session 37 - JSP - Part 2 (final)
PawanMM
 
Session 36 - JSP - Part 1
Session 36 - JSP - Part 1Session 36 - JSP - Part 1
Session 36 - JSP - Part 1
PawanMM
 
Session 35 - Design Patterns
Session 35 - Design PatternsSession 35 - Design Patterns
Session 35 - Design Patterns
PawanMM
 
Session 34 - JDBC Best Practices, Introduction to Design Patterns
Session 34 - JDBC Best Practices, Introduction to Design PatternsSession 34 - JDBC Best Practices, Introduction to Design Patterns
Session 34 - JDBC Best Practices, Introduction to Design Patterns
PawanMM
 
Session 33 - Session Management using other Techniques
Session 33 - Session Management using other TechniquesSession 33 - Session Management using other Techniques
Session 33 - Session Management using other Techniques
PawanMM
 
Session 32 - Session Management using Cookies
Session 32 - Session Management using CookiesSession 32 - Session Management using Cookies
Session 32 - Session Management using Cookies
PawanMM
 
Session 31 - Session Management, Best Practices, Design Patterns in Web Apps
Session 31 - Session Management, Best Practices, Design Patterns in Web AppsSession 31 - Session Management, Best Practices, Design Patterns in Web Apps
Session 31 - Session Management, Best Practices, Design Patterns in Web Apps
PawanMM
 
Session 30 - Servlets - Part 6
Session 30 - Servlets - Part 6Session 30 - Servlets - Part 6
Session 30 - Servlets - Part 6
PawanMM
 
Session 29 - Servlets - Part 5
Session 29 - Servlets - Part 5Session 29 - Servlets - Part 5
Session 29 - Servlets - Part 5
PawanMM
 
Session 28 - Servlets - Part 4
Session 28 - Servlets - Part 4Session 28 - Servlets - Part 4
Session 28 - Servlets - Part 4
PawanMM
 

More from PawanMM (20)

Session 48 - JS, JSON and AJAX
Session 48 - JS, JSON and AJAXSession 48 - JS, JSON and AJAX
Session 48 - JS, JSON and AJAX
 
Session 46 - Spring - Part 4 - Spring MVC
Session 46 - Spring - Part 4 - Spring MVCSession 46 - Spring - Part 4 - Spring MVC
Session 46 - Spring - Part 4 - Spring MVC
 
Session 45 - Spring - Part 3 - AOP
Session 45 - Spring - Part 3 - AOPSession 45 - Spring - Part 3 - AOP
Session 45 - Spring - Part 3 - AOP
 
Session 44 - Spring - Part 2 - Autowiring, Annotations, Java based Configuration
Session 44 - Spring - Part 2 - Autowiring, Annotations, Java based ConfigurationSession 44 - Spring - Part 2 - Autowiring, Annotations, Java based Configuration
Session 44 - Spring - Part 2 - Autowiring, Annotations, Java based Configuration
 
Session 43 - Spring - Part 1 - IoC DI Beans
Session 43 - Spring - Part 1 - IoC DI BeansSession 43 - Spring - Part 1 - IoC DI Beans
Session 43 - Spring - Part 1 - IoC DI Beans
 
Session 42 - Struts 2 Hibernate Integration
Session 42 - Struts 2 Hibernate IntegrationSession 42 - Struts 2 Hibernate Integration
Session 42 - Struts 2 Hibernate Integration
 
Session 41 - Struts 2 Introduction
Session 41 - Struts 2 IntroductionSession 41 - Struts 2 Introduction
Session 41 - Struts 2 Introduction
 
Session 40 - Hibernate - Part 2
Session 40 - Hibernate - Part 2Session 40 - Hibernate - Part 2
Session 40 - Hibernate - Part 2
 
Session 39 - Hibernate - Part 1
Session 39 - Hibernate - Part 1Session 39 - Hibernate - Part 1
Session 39 - Hibernate - Part 1
 
Session 38 - Core Java (New Features) - Part 1
Session 38 - Core Java (New Features) - Part 1Session 38 - Core Java (New Features) - Part 1
Session 38 - Core Java (New Features) - Part 1
 
Session 37 - JSP - Part 2 (final)
Session 37 - JSP - Part 2 (final)Session 37 - JSP - Part 2 (final)
Session 37 - JSP - Part 2 (final)
 
Session 36 - JSP - Part 1
Session 36 - JSP - Part 1Session 36 - JSP - Part 1
Session 36 - JSP - Part 1
 
Session 35 - Design Patterns
Session 35 - Design PatternsSession 35 - Design Patterns
Session 35 - Design Patterns
 
Session 34 - JDBC Best Practices, Introduction to Design Patterns
Session 34 - JDBC Best Practices, Introduction to Design PatternsSession 34 - JDBC Best Practices, Introduction to Design Patterns
Session 34 - JDBC Best Practices, Introduction to Design Patterns
 
Session 33 - Session Management using other Techniques
Session 33 - Session Management using other TechniquesSession 33 - Session Management using other Techniques
Session 33 - Session Management using other Techniques
 
Session 32 - Session Management using Cookies
Session 32 - Session Management using CookiesSession 32 - Session Management using Cookies
Session 32 - Session Management using Cookies
 
Session 31 - Session Management, Best Practices, Design Patterns in Web Apps
Session 31 - Session Management, Best Practices, Design Patterns in Web AppsSession 31 - Session Management, Best Practices, Design Patterns in Web Apps
Session 31 - Session Management, Best Practices, Design Patterns in Web Apps
 
Session 30 - Servlets - Part 6
Session 30 - Servlets - Part 6Session 30 - Servlets - Part 6
Session 30 - Servlets - Part 6
 
Session 29 - Servlets - Part 5
Session 29 - Servlets - Part 5Session 29 - Servlets - Part 5
Session 29 - Servlets - Part 5
 
Session 28 - Servlets - Part 4
Session 28 - Servlets - Part 4Session 28 - Servlets - Part 4
Session 28 - Servlets - Part 4
 

Recently uploaded

Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
FODUU
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 

Session 01 - Introduction to Java

  • 1. Page 0Classification: Restricted Java & JEE Training Session 1 - Introduction to Java
  • 2. Page 1Classification: Restricted MindsMapped Training Resources • Java Training Details • Knowledge Base
  • 3. Page 2Classification: Restricted Agenda • History of Java – A Programmer’s Perspective • Salient Features of Java • Major Java Editions
  • 4. Page 3Classification: Restricted Ice Breaking… • Expectation setting… • Bird’s eye view of the training…
  • 6. Page 5Classification: Restricted European Agricultural Revolution: 1700 onwards
  • 8. Page 7Classification: Restricted Evolution of Computer Science – initially based on mechanical systems
  • 9. Page 8Classification: Restricted A point to ponder… • What led to the evolution of electronic computation systems? More specifically… When we already had mechanical computing machines and calculators, what made us base the modern computing systems on electronics?
  • 10. Page 9Classification: Restricted A point to ponder… • What led to the evolution of electronic computation systems? More specifically… When we already had mechanical computing machines and calculators, what made us base the modern computing systems on electronics? • Switching speed. • Wear and tear.
  • 11. Page 10Classification: Restricted Building Blocks of a Basic Modern Computer System • Based on von Neumann architecture • John von Neumann was a Hungarian computer scientist. 2
  • 12. Page 11Classification: Restricted A point to ponder… • Ok, so the CPU is the brain of the computer system. Then why do I need an OS?
  • 13. Page 12Classification: Restricted A point to ponder… • Ok, so the CPU is the brain of the computer system. Then why do I need an OS? • Communicating with the CPU using its instruction set is cumbersome, it is difficult. We need an interpreter.
  • 14. Page 13Classification: Restricted A point to ponder… • Ok, an OS is the interface between the user and the CPU. Then why would I need a programming language?
  • 15. Page 14Classification: Restricted A point to ponder… • Ok, an OS is the interface between the user and the CPU. Then why would I need a programming language? • How would you add functionalities to the software that is not already available in an OS?
  • 16. Page 15Classification: Restricted A point to ponder… • Ok, agreed I would need a programming language. Now, that we already had other languages like C for Procedural Programming, C++ for Object Oriented Programming, why did we have to write another language like Java?
  • 17. Page 16Classification: Restricted A point to ponder… • Ok, agreed I would need a programming language. Now, that we already had other languages like C for procedural programming, C++ for Object Oriented Programming, why did we have to write another language like Java? • Necessity is the mother of invention. There is a business intent behind this invention too. But, what is that requirement?
  • 18. Page 17Classification: Restricted The Compilation Process for Non-Java Programs (like C & C++) Source Code (programming language instructions) Object Code (binary instructions) Programmers write this. Computers run this. Compilers compile source code into object code.
  • 19. Page 18Classification: Restricted History of Java • In the early 1990's, putting intelligence into home appliances was thought to be the next "hot" technology. • Examples of intelligent home appliances: • Coffee pots and lights that can be controlled by a computer's programs. • Televisions that can be controlled by an interactive television device's programs. • Anticipating a strong market for such things, Sun Microsystems in 1991 funded a research project (code named Green) whose goal was to develop software for intelligent home appliances. • An intelligent home appliance's intelligence comes from its embedded processor chips and the software that runs on the processor chips. • Appliance processor chips change often because engineers continually find ways to make them smaller, less expensive, and more powerful. • To handle the frequent turnover of new chips, appliance software must be extremely portable.
  • 20. Page 19Classification: Restricted The Issue of Portability • A piece of software is portable if it can be used on many different types of computers. • Object code is not very portable. As you know, object code is comprised of binary-format instructions. Those binary-format instructions are intimately tied to a particular type of computer. If you've got object code that was created on a type X computer, then the object code can run only on a type X computer. • The Java solution to improve portability: • Java compilers don't compile all the way down to object code. Instead, they compile down to bytecode, which possesses the best features of both object code and source code: • Like object code, bytecode uses a format that works closely with computer hardware, so it runs fast. • Like source code, bytecode is generic, so it can be run on any type of computer.
  • 21. Page 20Classification: Restricted The Compilation Process for Java Programs Java source code object code Java compilers compile source code into bytecode. bytecode When a Java program is run, the JVM translates bytecode to object code.
  • 22. Page 21Classification: Restricted Java Virtual Machine • How can bytecode be run on any type of computer? • As a Java program’s bytecode runs, the bytecode is translated into object code by the computer's bytecode interpreter program. The bytecode interpreter program is known as the Java Virtual Machine, or JVM for short. The JVM is written specifically for every platform.
  • 23. Page 22Classification: Restricted Issue of Portability Solved.. But.. • Originally, Sun planned to use C++ for its home appliance software, but they soon realized that C++ was less than ideal because it wasn't portable enough and it relied too heavily on hard-to-maintain things called pointers. • Thus, rather than write C++ software and fight C++'s inherent deficiencies, Sun decided to develop a whole new programming language to handle its home appliance software needs. • Their new language was originally named Oak (for the tree that was outside project leader James Gosling's window), but it was soon changed to Java. • When the home appliance software work dried up, Java almost died before being released. • Fortunately for Java, the World Wide Web exploded in popularity and Sun realized it could capitalize on that.
  • 24. Page 23Classification: Restricted Issue of Portability Solved.. But.. • Web pages have to be very portable because they can be downloaded onto any type of computer. • What's the standard language used for Web pages? • Java programs are very portable and they're better than HTML in terms of providing user interaction capabilities. • Java programs that are embedded in Web pages are called applets. • Although applets still play a significant role in Java's current success, some of the other types of Java programs have surpassed applets in terms of popularity. • In this course, we cover Standard Edition (SE) Java applications. They are Java programs that run on a standard computer – a desktop or a laptop, without the need of the Internet. 19
  • 25. Page 24Classification: Restricted Features Of Java • Simple • Similar to C and C++, but without the demerits… • Omits operator overloading, multiple inheritance • Goto statement is eliminated • Header files are eliminated • No concept of pointers • Automatic Garbage collection • A rich set of predefined classes
  • 26. Page 25Classification: Restricted Features Of Java • Object-Oriented • Forces the programmer to use the classes and object • Class • Member variables( data ) and member functions ( methods )
  • 27. Page 26Classification: Restricted Features Of Java • Robust • designed for writing highly reliable or robust software: • automatic garbage collection, which prevents memory leaks • Type safety of data • Extensive compile time and runtime checking • Object Oriented Exception Handling of run time errors • Divide by zero exception.
  • 28. Page 27Classification: Restricted Features Of Java • Architectural Neutral and Interpreted • compiler generates bytecodes • Easy to interpret on any machine • “Write once and run anywhere WORA”
  • 29. Page 28Classification: Restricted Features Of Java • Powerful • Networking • Threads • Distributed Objects • Database Access • Graphics • Data structure library • Serialization • Digital Signatures
  • 30. Page 29Classification: Restricted Features Of Java • Java is Popular
  • 31. Page 30Classification: Restricted Features Of Java • Distributed • Supports TCP/IP • Remote Method • Invocation (RMI) • Web Services
  • 32. Page 31Classification: Restricted Features of Java • Multi-Threaded • Parallel processing to improve the performance of certain types of programs
  • 34. Page 33Classification: Restricted Setting up environment for Java Development MindsMapped Consulting
  • 35. Page 34Classification: Restricted Steps for Environment Setup 1. Download and install latest JDK from Oracle site 2. Download and install Eclipse
  • 36. Page 35Classification: Restricted Download latest JDK from Oracle site • "JDK" or "JRE"? JRE (Java Runtime) is needed for running Java programs. JDK (Java Development Kit), which includes JRE plus the development tools (such as compiler and debugger), is need for writing as well as running Java programs. Since you are supposed to write Java Programs, you should install JDK, which includes JRE. • To download and install JDK follow the steps in the following slides.
  • 37. Page 36Classification: Restricted Download latest JDK from Oracle site – Step 0 Step 0: Un-Install Older Version(s) of JDK/JRE • I recommend that you install only the latest JDK. Although you can install multiple versions of JDK concurrently, it is messy. • If you have previously installed older version(s) of JDK/JRE, un-install ALL of them. Goto "Control Panel" ⇒ "Program and Features" ⇒ Un-install ALL programs begin with "Java", such as "Java SE Development Kit ...", "Java SE Runtime ...", and etc.
  • 38. Page 37Classification: Restricted Download latest JDK from Oracle site – Step 1 Step 1: Download JDK 1. Goto Java SE download site @ http://www.oracle.com/technetwork/java/javase/downloads/index.html 2. Under "Java Platform, Standard Edition" ⇒ "Java SE 8u{xx}", where {xx} is the latest update number ⇒ Click the "JDK Download" button. 3. Check "Accept License Agreement". 4. Choose your operating platform, e.g., "Windows x64" (for 64-bit Windows OS) or "Windows x86" (for 32-bit Windows OS). You can check whether your Windows OS is 32-bit or 64-bit via "Control Panel" ⇒ "System" ⇒ Under "System Type".
  • 39. Page 38Classification: Restricted Download latest JDK from Oracle site – Step 2 Step 2: Install JDK and JRE 1. Run the downloaded installer (e.g., "jdk-8u{xx}-windows-x64.exe"), which installs both the JDK and JRE. By default, the JDK will be installed in directory "C:Program FilesJavajdk1.8.0_xx", where xx denotes the latest upgrade number; and JRE in "C:Program FilesJavajre1.8.0_xx". 2. For novices, accept the defaults. Follow the screen instructions to install JDK and JRE. 3. Check the JDK installed directory by inspecting these folders using File Explorer. Take note of your JDK installed directory, which you will need in the next step. 4. I shall refer to the installation directory as <JAVA_HOME>
  • 40. Page 39Classification: Restricted Download latest JDK from Oracle site – Step 3 Step 3: Include JDK's "bin" Directory in the PATH Windows OS searches the current directory and the directories listed in the PATH environment variable for executable programs. JDK's programs (such as Java compiler javac.exe and Java runtime java.exe) reside in directory "<JAVA_HOME>bin" (where <JAVA_HOME> denotes the JDK installed directory). You need to include "<JAVA_HOME>bin" in the PATH to run the JDK programs. To edit the PATH environment variable in Windows XP/Vista/7/8/10: 1. Launch "Control Panel" ⇒ "System" ⇒ Click "Advanced system settings". 2. Switch to "Advanced" tab ⇒ "Environment Variables". 3. Under "System Variables", scroll down to select "Path" ⇒ "Edit...". 4. (CAUTION: Read this paragraph 3 times before doing this step! There is no UNDO) For Windows 10: You see a table listing the existing PATH entries. Click "New" ⇒ Enter the JDK's binary directory "c:Program FilesJavajdk1.8.0_xxbin" (Replace xx with your installation's upgrade number!!!) ⇒ Select "Move Up" to move it all the way to the top. Prior to Windows 10: In "Variable value" field, INSERT "c:Program FilesJavajdk1.8.0_xxbin" (Replace xx with your installation upgrade number!!!) IN FRONT of all the existing directories, followed by a semi-colon (;) which separates the JDK's binary directory from the rest of the existing directories. DO NOT DELETE any existing entries; otherwise, some existing applications may not run.
  • 41. Page 40Classification: Restricted Download latest JDK from Oracle site – Step 4 Step 4: Verify the JDK Installation Launch a CMD shell (Click "Start" button ⇒ run... ⇒ enter "cmd"; OR from "Start" button ⇒ All Programs ⇒ Accessories ⇒ Command Prompt). • Issue "path" command to list the contents of the PATH environment variable. Check to make sure that your <JAVA_HOME>bin is listed in the PATH. // Display the PATH entries prompt> path PATH=c:Program FilesJavajdk1.8.0_xxbin;[other entries...] Don't type prompt>, which denotes the command prompt!!! Key in the command (highlighted) only. • Issue the following commands to verify that JDK/JRE are properly installed and display their version: // Display the JRE version prompt> java -version java version "1.8.0_xx" Java(TM) SE Runtime Environment (build 1.8.0_xx-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode) // Display the JDK version prompt> javac -version javac 1.8.0_xx
  • 42. Page 41Classification: Restricted Download and Install Eclipse • Download Eclipse from: http://www.eclipse.org/downloads/packages/release/Neon/2 * Neon is the latest Eclipse release as of today. You can download the latest Eclipse release. • To install, all you have to do is extract the zip folder. • While starting Eclipse, choose a workspace to store all your project files. • Once Eclipse is launched, point it to the JDK you installed earlier Preferences -> Java -> Installed JRE's
  • 43. Page 42Classification: Restricted Topics to be covered in next session • Principles of Object Oriented Programming • Writing your first Java Application • Elements of Java programming language • Built in Data Types • Conditional Statements • Loops