SlideShare a Scribd company logo
Java Fundamentals
Middleware Trains
Java Fundamentals
Prasad
middleware.trains@gmail.com
Java Fundamentals
Java
Contents
 Java
 J2EE
 Application Packaging
 Class Loading
Java Fundamentals
Java
What is Java?
Programming Language :
They are set of code which performs a particular task
Ex : code to multiply 2 number / code to get a variable and process it ..
Programming Languages classification
• High level language vs low level language
• Compiler based vs Interpreter based
Java is high level compiler based language
Code.java (source) > compiled (using javac) > code.class > gets executed by JVM
.java files are human readable files
.class are JVM understandable files
PLATFORM
Java Fundamentals
Java
‘Java ‘ – Is Platform Independent , but how ?
Java is platform independent, but JVMs are platform Dependent
Windows Linux MAC
Java Code
JVM
Windows
JVM
Linux
JVM
MAC
Java Code is run on JVM
JVMs are run on Specific OS
Java Fundamentals
Java
Java Virtual Machine
JVM repositories are called JDK (Java developers kit)
JDK = JRE + Developers utilities
Java Fundamentals
Java
How Java Runs ?
Java Fundamentals
Java
Java Summary
• Java is a high level Compiler based programming language
• Java is platform Independent , (Java code can be executed on any
platform)
• Java is executed by a JVM (Java Virtual Machine)
• JVM is platform dependent
• JVM is a software which needs to be installed on platforms
• JVM ‘s repository is called JDK (Java Developers kit)
• JDK = JRE (Java runtime Environment ) + Developer’s utilities
• For a Java code to run/execute JRE is enough
• Latest version of JDK is Java8
• Java needs executed with Java Parameters
• Basic java parameters Min Heap size, Max Heap Size and Server variable
• -Xms and –Xmx, -Xms 512 -Xmx 2048
Java Fundamentals
J2EE
J2EE
Java Fundamentals
J2EE
J2EE - Java Standards
“J2EE is a java standard for application development, which is
collection of Java API and frame work for development”
Java
Standards
Expansion Uses
J2SE Java Standard
Edition
Java standard edition is a standard
format
J2EE Java Enterprise
Edition
J2SE+ Standard to maintain
Enterprise application
J2ME Java Mobile Edition J2SE+ Standards to Maintain Mobile
applications
Java Fundamentals
J2EE
MVC : Model View Controller (MVC) – Flow Architecture
• MVC architecture
• Java application Packaging
• Java Application utilities for enterprise (Servlets, JSP….)
In application ,
Java Fundamentals
J2EE
MVC Model ….
MVC Parts Enabling J2EE Components
Business Models Java Beans and EJBs
Controller Servlets
View Java Server Faces (jsf) / Java Servlet Pages (jsp)
Java Fundamentals
J2EE
J2EE Components
• Servlets - A server –side components used for routing/controlling
• Java Server Pages (JSPs) __ |Client -side component to receive and
• Java Server Faces (JSFs) | respond to client
• Enterprise Java Beans (EJBs) – Server-side component architecture
for modular construction of enterprise applications. The EJB
specification is one of several Java APIs in the Java EE
specification. EJB is a server-side model that encapsulates the
business logic of an application.
• Session Beans
• Entity Beans
• Message Driven Beans – Deprecate
---- Wikipedia
Java Fundamentals
J2EE
J2EE Containers
• Runtime to manage application components
• Provides access to J2EE APIs.
• Provides system level services such as Transaction, Security etc
• There are three types of containers
• Web Container (handles Servlet. JSP and JSF request)
• EJB Container (Handles EJB request)
• Embedded HTTP container (Handles static Request like HTML)
MVC Parts J2EE Components J2EE Containers
Models Java Beans and EJBs EJB Container
Controller Servlets Web Container
View JSP/JSF Web Container
Java Fundamentals
J2EE
J2EE APIs
• Data Base Connectivity-- JDBC
• Messaging Infrastructure-- JMS
• Transactions-- JTA
• Security-- JAAS
• Mail products-- JavaMail
• System Administration -- JMX
• Directory and Naming Services--JNDI
Java Fundamentals
J2EE
J2EE Architecture – Component Architecture
Application Server
Embedded
HTTPserver EJB ContainerWeb Container
HTML
JSP SessionServlet Entity
Native
Component
Java Virtual MachineJNDI
JDBC
JMS
Java
Mail
JTA
JMX
J2C
Data
Base
JDBC
Admin
JMX
MQ
JMS
Legacy
J2C
Web
Service
Browser
Client
Http
Server
http
http
SOAP
http
CSIv2
RMI
SSL
RMI/IIOP
Http
SOAP
TCP/UDP
UDDI
RMI/IIOP
Java Fundamentals
Application packaging
Application packaging
Java Fundamentals
Application packaging
Application Deployment - Environments
Development
Base
Application
Dev Config
Server 1
Testing
Base
Application
Test Config
Server 1
UAT
Base
Application
UAT Config
Server 1
Used by the client to
test the business
functions
Used by developers to
build the application
using development
tools like IDEs. The
connection
configurations are at
dev level
Used by admin/testers
to perform , testing like
manual testing ,
performance testing
etc. The connection
resources are at test
level
Java Fundamentals
Application packaging
Stage or Pre-Prod
Base
Application
Stage Config
This environment is the replica of the production
environment .This is also used as a back up for
Prod in case of emergency
Server 1 Server 2
Production
Base
Application
Prod Config
This is the actual live environment , Which
powers the application which is used by the end
users
Server 1 Server 2
Application Deployment - Environments
Java Fundamentals
Application packaging
Application packaging
“Application packaging is packing the java code in form a archive ,
its contents contain environmental references, Deployment
descriptors, java Source code and static contents “
The main uses of packaging the application are
• Avoid corruption of java files and file loss
• Easy to transfer between servers and environments
• Easy to deploy
• Easy to access the classes
Types of Packages
• JAR – Java Archive
• WAR – Web Archive
• EAR – Enterprise Archive
Java Fundamentals
Application packaging
Application packaging
Java Fundamentals
Application packaging
Request Flow
Url ear application.xml  war  web.xml  classes(inside
jar)
Java Fundamentals
Application packaging
J2EE EAR Files
ear
EJB
Module
Web
Module
Java
Utility Jar
Resource
Adapter
Client
Modules
Java
Persistence
EJB DD
EJB Ext DD
EJB Bind DD
Web DD
Web Ext DD
Web Bind DD
Client DD
Client Ext DD
Client Bind DD
Resource DD
Persistence DD
Java Fundamentals
Application packaging
Deployment Descriptors
“A deployment descriptor (DD) refers to a configuration file for
an artifact that is deployed to some java container”
• The deployment descriptor must be called web.xml and must reside
in the WEB-INF directory in the web application root.
• For Java EE applications, the deployment descriptor must be named
application.xml and must be placed directly in the META-INF
directory at the top level of the application .ear file.
Java Fundamentals
Class loaders
Class Loading
Java Fundamentals
Class loaders
What are Class Loaders ?
Class loaders find and load class files. Class loaders enable applications that
are deployed on servers to access repositories of available classes and
resources.
Application developers and deployer must consider the location of class and
resource files, and the class loaders used to access those files, to make the files
available to deployed applications
Types of class loading
1. JVM Class loading
1. Bootstrap class loading
2. Extension Class loading
2. Weblogic class loading
3. Application Class loading
4. Module class loading
Java Fundamentals
Class loaders
What are Class Loaders ?
Types of class loading
1. JVM Class loading
1. Bootstrap class loading - C:Program FilesJavajdk1.7.0_45jrelib
2. Extension Class loading -C:Program FilesJavajdk1.7.0_45jrelibext
2. System Class loaders – Location of the middleware installed (its lib)
3. Application Class loading – Location of the deployed application (its lib)
4. Module class loading – Applications
Java Fundamentals
Class loaders
Class Loaders Big Picture
JVM class Loaders
System Class Loaders
App class Loaders
Module Level
Class Loaders
App class Loaders
Module Level
Class Loaders
Module Level
Class Loaders
Module Level
Class Loaders

More Related Content

What's hot (20)

PPTX
Jdbc
gee eew3
 
PPT
java database connection (jdbc)
Sanjay Gunjal
 
PPTX
Java ee introduction
Moumie Soulemane
 
ODP
Intro in JavaEE world (TU Olomouc)
blahap
 
DOC
jdbc document
Yamuna Devi
 
PPT
Designing JEE Application Structure
odedns
 
PDF
Ajava final(sachin sir9822506209)_vision_academy_21
SachinZurange
 
PPT
J2ee
Prince Soni
 
PPT
Jdbc drivers
Prabhat gangwar
 
PPTX
Types of Drivers in JDBC
Hemant Sharma
 
ODP
Java Web Programming [1/9] : Introduction to Web Application
IMC Institute
 
PPT
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...
Pallepati Vasavi
 
PDF
Introduction to Java EE (J2EE)
Atit Patumvan
 
PPTX
JDBC Driver Types
Rahul Sharma
 
PDF
A dynamic application using jboss
ijcax
 
PPT
Unit 5-jdbc2
msafad
 
PPTX
Chapter 12:Understanding Server-Side Technologies
It Academy
 
DOCX
Jboss
Sridhar Rapala
 
PPT
Introduction to java ee
Ranjan Kumar
 
PPT
Mobile Application Development MAD J2ME UNIT 2
Pallepati Vasavi
 
Jdbc
gee eew3
 
java database connection (jdbc)
Sanjay Gunjal
 
Java ee introduction
Moumie Soulemane
 
Intro in JavaEE world (TU Olomouc)
blahap
 
jdbc document
Yamuna Devi
 
Designing JEE Application Structure
odedns
 
Ajava final(sachin sir9822506209)_vision_academy_21
SachinZurange
 
Jdbc drivers
Prabhat gangwar
 
Types of Drivers in JDBC
Hemant Sharma
 
Java Web Programming [1/9] : Introduction to Web Application
IMC Institute
 
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...
Pallepati Vasavi
 
Introduction to Java EE (J2EE)
Atit Patumvan
 
JDBC Driver Types
Rahul Sharma
 
A dynamic application using jboss
ijcax
 
Unit 5-jdbc2
msafad
 
Chapter 12:Understanding Server-Side Technologies
It Academy
 
Introduction to java ee
Ranjan Kumar
 
Mobile Application Development MAD J2ME UNIT 2
Pallepati Vasavi
 

Similar to Java Introduction (20)

PPTX
1. Java Project Guidance for engineering
vyshukodumuri
 
PPTX
01. Introduction to programming with java
Intro C# Book
 
PPT
Java & J2EE Struts with Hibernate Framework
Mohit Belwal
 
PPTX
C,c++,java,php,.net training institute in delhi, best training institute for ...
MCM COmpetitive Classes
 
PPTX
Java programming(unit 1)
Dr. SURBHI SAROHA
 
PPTX
Introduction to java
Sandeep Rawat
 
PPT
J2ee strutswithhibernate-140121221332-phpapp01
Jay Palit
 
PDF
Bn1005 demo ppt core java
conline training
 
PPTX
Introduction to java
Java Lover
 
PPTX
UNIT 1.pptx
EduclentMegasoftel
 
PDF
J introtojava1-pdf
Emmanuel Alimpolos
 
PDF
TechSearchWeb Tutorials.pdf
TechSearchWeb
 
PPTX
1 java programming- introduction
jyoti_lakhani
 
PDF
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
10322210023
 
PPT
PPS Java Overview Unit I.ppt
CDSukte
 
PPT
PPS Java Overview Unit I.ppt
RajeshSukte1
 
PDF
Java course in Chandigarh.pdf
ExcellenceTechnology9
 
PPT
Javaee intro
haris147
 
PDF
TechSearchWeb.pdf
TechSearchWeb
 
1. Java Project Guidance for engineering
vyshukodumuri
 
01. Introduction to programming with java
Intro C# Book
 
Java & J2EE Struts with Hibernate Framework
Mohit Belwal
 
C,c++,java,php,.net training institute in delhi, best training institute for ...
MCM COmpetitive Classes
 
Java programming(unit 1)
Dr. SURBHI SAROHA
 
Introduction to java
Sandeep Rawat
 
J2ee strutswithhibernate-140121221332-phpapp01
Jay Palit
 
Bn1005 demo ppt core java
conline training
 
Introduction to java
Java Lover
 
UNIT 1.pptx
EduclentMegasoftel
 
J introtojava1-pdf
Emmanuel Alimpolos
 
TechSearchWeb Tutorials.pdf
TechSearchWeb
 
1 java programming- introduction
jyoti_lakhani
 
1. JAVA_Module_1-edited - AJIN ABRAHAM.pptx.pdf
10322210023
 
PPS Java Overview Unit I.ppt
CDSukte
 
PPS Java Overview Unit I.ppt
RajeshSukte1
 
Java course in Chandigarh.pdf
ExcellenceTechnology9
 
Javaee intro
haris147
 
TechSearchWeb.pdf
TechSearchWeb
 
Ad

Recently uploaded (20)

PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
July Patch Tuesday
Ivanti
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Advancing WebDriver BiDi support in WebKit
Igalia
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
July Patch Tuesday
Ivanti
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Advancing WebDriver BiDi support in WebKit
Igalia
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Ad

Java Introduction

  • 2. Java Fundamentals Java Contents  Java  J2EE  Application Packaging  Class Loading
  • 3. Java Fundamentals Java What is Java? Programming Language : They are set of code which performs a particular task Ex : code to multiply 2 number / code to get a variable and process it .. Programming Languages classification • High level language vs low level language • Compiler based vs Interpreter based Java is high level compiler based language Code.java (source) > compiled (using javac) > code.class > gets executed by JVM .java files are human readable files .class are JVM understandable files
  • 4. PLATFORM Java Fundamentals Java ‘Java ‘ – Is Platform Independent , but how ? Java is platform independent, but JVMs are platform Dependent Windows Linux MAC Java Code JVM Windows JVM Linux JVM MAC Java Code is run on JVM JVMs are run on Specific OS
  • 5. Java Fundamentals Java Java Virtual Machine JVM repositories are called JDK (Java developers kit) JDK = JRE + Developers utilities
  • 7. Java Fundamentals Java Java Summary • Java is a high level Compiler based programming language • Java is platform Independent , (Java code can be executed on any platform) • Java is executed by a JVM (Java Virtual Machine) • JVM is platform dependent • JVM is a software which needs to be installed on platforms • JVM ‘s repository is called JDK (Java Developers kit) • JDK = JRE (Java runtime Environment ) + Developer’s utilities • For a Java code to run/execute JRE is enough • Latest version of JDK is Java8 • Java needs executed with Java Parameters • Basic java parameters Min Heap size, Max Heap Size and Server variable • -Xms and –Xmx, -Xms 512 -Xmx 2048
  • 9. Java Fundamentals J2EE J2EE - Java Standards “J2EE is a java standard for application development, which is collection of Java API and frame work for development” Java Standards Expansion Uses J2SE Java Standard Edition Java standard edition is a standard format J2EE Java Enterprise Edition J2SE+ Standard to maintain Enterprise application J2ME Java Mobile Edition J2SE+ Standards to Maintain Mobile applications
  • 10. Java Fundamentals J2EE MVC : Model View Controller (MVC) – Flow Architecture • MVC architecture • Java application Packaging • Java Application utilities for enterprise (Servlets, JSP….) In application ,
  • 11. Java Fundamentals J2EE MVC Model …. MVC Parts Enabling J2EE Components Business Models Java Beans and EJBs Controller Servlets View Java Server Faces (jsf) / Java Servlet Pages (jsp)
  • 12. Java Fundamentals J2EE J2EE Components • Servlets - A server –side components used for routing/controlling • Java Server Pages (JSPs) __ |Client -side component to receive and • Java Server Faces (JSFs) | respond to client • Enterprise Java Beans (EJBs) – Server-side component architecture for modular construction of enterprise applications. The EJB specification is one of several Java APIs in the Java EE specification. EJB is a server-side model that encapsulates the business logic of an application. • Session Beans • Entity Beans • Message Driven Beans – Deprecate ---- Wikipedia
  • 13. Java Fundamentals J2EE J2EE Containers • Runtime to manage application components • Provides access to J2EE APIs. • Provides system level services such as Transaction, Security etc • There are three types of containers • Web Container (handles Servlet. JSP and JSF request) • EJB Container (Handles EJB request) • Embedded HTTP container (Handles static Request like HTML) MVC Parts J2EE Components J2EE Containers Models Java Beans and EJBs EJB Container Controller Servlets Web Container View JSP/JSF Web Container
  • 14. Java Fundamentals J2EE J2EE APIs • Data Base Connectivity-- JDBC • Messaging Infrastructure-- JMS • Transactions-- JTA • Security-- JAAS • Mail products-- JavaMail • System Administration -- JMX • Directory and Naming Services--JNDI
  • 15. Java Fundamentals J2EE J2EE Architecture – Component Architecture Application Server Embedded HTTPserver EJB ContainerWeb Container HTML JSP SessionServlet Entity Native Component Java Virtual MachineJNDI JDBC JMS Java Mail JTA JMX J2C Data Base JDBC Admin JMX MQ JMS Legacy J2C Web Service Browser Client Http Server http http SOAP http CSIv2 RMI SSL RMI/IIOP Http SOAP TCP/UDP UDDI RMI/IIOP
  • 17. Java Fundamentals Application packaging Application Deployment - Environments Development Base Application Dev Config Server 1 Testing Base Application Test Config Server 1 UAT Base Application UAT Config Server 1 Used by the client to test the business functions Used by developers to build the application using development tools like IDEs. The connection configurations are at dev level Used by admin/testers to perform , testing like manual testing , performance testing etc. The connection resources are at test level
  • 18. Java Fundamentals Application packaging Stage or Pre-Prod Base Application Stage Config This environment is the replica of the production environment .This is also used as a back up for Prod in case of emergency Server 1 Server 2 Production Base Application Prod Config This is the actual live environment , Which powers the application which is used by the end users Server 1 Server 2 Application Deployment - Environments
  • 19. Java Fundamentals Application packaging Application packaging “Application packaging is packing the java code in form a archive , its contents contain environmental references, Deployment descriptors, java Source code and static contents “ The main uses of packaging the application are • Avoid corruption of java files and file loss • Easy to transfer between servers and environments • Easy to deploy • Easy to access the classes Types of Packages • JAR – Java Archive • WAR – Web Archive • EAR – Enterprise Archive
  • 21. Java Fundamentals Application packaging Request Flow Url ear application.xml  war  web.xml  classes(inside jar)
  • 22. Java Fundamentals Application packaging J2EE EAR Files ear EJB Module Web Module Java Utility Jar Resource Adapter Client Modules Java Persistence EJB DD EJB Ext DD EJB Bind DD Web DD Web Ext DD Web Bind DD Client DD Client Ext DD Client Bind DD Resource DD Persistence DD
  • 23. Java Fundamentals Application packaging Deployment Descriptors “A deployment descriptor (DD) refers to a configuration file for an artifact that is deployed to some java container” • The deployment descriptor must be called web.xml and must reside in the WEB-INF directory in the web application root. • For Java EE applications, the deployment descriptor must be named application.xml and must be placed directly in the META-INF directory at the top level of the application .ear file.
  • 25. Java Fundamentals Class loaders What are Class Loaders ? Class loaders find and load class files. Class loaders enable applications that are deployed on servers to access repositories of available classes and resources. Application developers and deployer must consider the location of class and resource files, and the class loaders used to access those files, to make the files available to deployed applications Types of class loading 1. JVM Class loading 1. Bootstrap class loading 2. Extension Class loading 2. Weblogic class loading 3. Application Class loading 4. Module class loading
  • 26. Java Fundamentals Class loaders What are Class Loaders ? Types of class loading 1. JVM Class loading 1. Bootstrap class loading - C:Program FilesJavajdk1.7.0_45jrelib 2. Extension Class loading -C:Program FilesJavajdk1.7.0_45jrelibext 2. System Class loaders – Location of the middleware installed (its lib) 3. Application Class loading – Location of the deployed application (its lib) 4. Module class loading – Applications
  • 27. Java Fundamentals Class loaders Class Loaders Big Picture JVM class Loaders System Class Loaders App class Loaders Module Level Class Loaders App class Loaders Module Level Class Loaders Module Level Class Loaders Module Level Class Loaders