0% found this document useful (0 votes)
44 views

1.1 - Java Platform Overview

The document provides an overview of the Java programming language, including its origins, characteristics, platforms, and key components. It discusses how Java is an object-oriented language that is platform independent, portable, robust, and widely used for both desktop and enterprise applications as well as mobile devices. The document also explains the Java Development Kit (JDK), Java Runtime Environment (JRE), and Java Virtual Machine (JVM).

Uploaded by

prasanth
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

1.1 - Java Platform Overview

The document provides an overview of the Java programming language, including its origins, characteristics, platforms, and key components. It discusses how Java is an object-oriented language that is platform independent, portable, robust, and widely used for both desktop and enterprise applications as well as mobile devices. The document also explains the Java Development Kit (JDK), Java Runtime Environment (JRE), and Java Virtual Machine (JVM).

Uploaded by

prasanth
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 29

CSE310: Programming in Java

Topic: Java Platform Overview

By
Arvind Kumar
Asst. Professor, LPU
Outlines
• Introduction
• Why Java?
• Where it is used?
• Characteristics of Java
• Java Platform Editions
• Evolution of Java
• Understanding JDK, JRE and JVM
• How Java is platform-independent
• Evaluating Java libraries, middle-ware, and database
options
Procedural Programming Languages
• Many early programming languages followed a paradigm
called Procedural Programming.
• These languages use a sequential pattern of program
execution.
• Drawbacks to procedural programming:
– Difficult to translate real-world use cases to a
sequential pattern
– Difficult to maintain programs
– Difficult to enhance as needed
JAVA
 Java is a general purpose object-oriented programming
language.

 Java is a high level, robust, secured and platform


independent.

 Developed by Sun Microsystems (James Gosling).

Platform: Any hardware or software environment in


which a program runs, is known as a platform.
Why Java?

 Java is the Internet programming language.

 Java enables users to develop and deploy applications


on the Internet for servers, desktop computers, and
small hand-held devices.
Where it is Used?
 According to Sun, 3 billion devices run java.

• Desktop Applications such as acrobat reader, media player,


antivirus etc.

• Web Applications such as irctc.co.in, javatpoint.com etc.

• Enterprise Applications such as banking applications.

• Mobile Applications

• Embedded System, Smart Card, Robotics, Games etc.


Characteristics of Java
• Java Is Simple
• Java Is Object-Oriented
• Java Is Distributed
• Java Is Interpreted
• Java Is Robust
• Java Is Secure
• Java Is Architecture-Neutral
• Java Is Portable
• Java's Performance
• Java Is Multithreaded
• Java Is Dynamic
Characteristics of Java
• Java Is Simple Java is partially modeled on C++, but
greatly simplified and improved. Some
• Java Is Object-Oriented people refer to Java as "C++--" because it
• Java Is Distributed is like C++ but with more functionality and
fewer negative aspects.
• Java Is Interpreted
• Java Is Robust
• Java Is Secure
• Java Is Architecture-Neutral
• Java Is Portable
• Java's Performance
• Java Is Multithreaded
• Java Is Dynamic
Characteristics of Java
• Java Is Simple Java is inherently object-oriented.
Although many object-oriented
• Java Is Object-Oriented languages began strictly as procedural
• Java Is Distributed languages, Java was designed from
the start to be object-oriented. Object-
• Java Is Interpreted
oriented programming (OOP) is a
• Java Is Robust popular programming approach that is
• Java Is Secure replacing traditional procedural
programming techniques.
• Java Is Architecture-Neutral
• Java Is Portable One of the central issues in software
development is how to reuse code.
• Java's Performance Object-oriented programming provides
• Java Is Multithreaded great flexibility, modularity, clarity, and
reusability through encapsulation,
• Java Is Dynamic inheritance, and polymorphism.
Characteristics of Java
• Java Is Simple Distributed computing involves several
computers working together on a
• Java Is Object-Oriented network. Java is designed to make
• Java Is Distributed distributed computing easy. Since
networking capability is inherently
• Java Is Interpreted
integrated into Java, writing network
• Java Is Robust programs is like sending and receiving
• Java Is Secure data to and from a file.

• Java Is Architecture-Neutral
• Java Is Portable
• Java's Performance
• Java Is Multithreaded
• Java Is Dynamic
Characteristics of Java
• Java Is Simple You need an interpreter to run Java
programs. The programs are compiled
• Java Is Object-Oriented into the Java Virtual Machine code
• Java Is Distributed called bytecode. The bytecode is
machine-independent and can run on
• Java Is Interpreted
any machine that has a Java
• Java Is Robust interpreter, which is part of the Java
• Java Is Secure Virtual Machine (JVM).

• Java Is Architecture-Neutral
• Java Is Portable
• Java's Performance
• Java Is Multithreaded
• Java Is Dynamic
Characteristics of Java
• Java Is Simple Java compilers can detect many
problems that would first show up at
• Java Is Object-Oriented execution time in other languages.
• Java Is Distributed
Java has eliminated certain types of
• Java Is Interpreted
error-prone programming constructs
• Java Is Robust found in other languages.
• Java Is Secure
Java has a runtime exception-handling
• Java Is Architecture-Neutral feature to provide programming
• Java Is Portable support for robustness.
• Java's Performance
• Java Is Multithreaded
• Java Is Dynamic
Characteristics of Java
• Java Is Simple
• Java Is Object-Oriented
• Java Is Distributed
• Java Is Interpreted
No explicit pointer
• Java Is Robust Programs run inside virtual machine
• Java Is Secure sandbox.
• Java Is Architecture-Neutral
• Java Is Portable
• Java's Performance
• Java Is Multithreaded
• Java Is Dynamic
Characteristics of Java
• Java Is Simple
• Java Is Object-Oriented
• Java Is Distributed
• Java Is Interpreted
• Java Is Robust
• Java Is Secure
• Java Is Architecture-Neutral Write once, run anywhere
• Java Is Portable
With a Java Virtual Machine (JVM),
• Java's Performance you can write one program that will
• Java Is Multithreaded run on any platform.

• Java Is Dynamic
Characteristics of Java
• Java Is Simple
• Java Is Object-Oriented
• Java Is Distributed
• Java Is Interpreted
• Java Is Robust
• Java Is Secure
• Java Is Architecture-Neutral
• Java Is Portable Because Java is architecture neutral,
Java programs are portable. They can
• Java's Performance
be run on any platform without being
• Java Is Multithreaded recompiled.
• Java Is Dynamic
Characteristics of Java
• Java Is Simple
• Java Is Object-Oriented
• Java Is Distributed
• Java Is Interpreted
• Java Is Robust
• Java Is Secure
• Java Is Architecture-Neutral
• Java Is Portable Java is faster than traditional
interpretation since byte code is "close"
• Java's Performance
to native code still somewhat slower
• Java Is Multithreaded than a compiled language (e.g., C++)
• Java Is Dynamic
Characteristics of Java
• Java Is Simple
• Java Is Object-Oriented
• Java Is Distributed
• Java Is Interpreted
• Java Is Robust
• Java Is Secure
• Java Is Architecture-Neutral
• Java Is Portable
• Java's Performance
Multithread programming is smoothly
• Java Is Multithreaded integrated in Java, whereas in other
• Java Is Dynamic languages you have to call procedures
specific to the operating system to enable
multithreading.
Characteristics of Java
• Java Is Simple
• Java Is Object-Oriented
• Java Is Distributed
• Java Is Interpreted
• Java Is Robust
• Java Is Secure
• Java Is Architecture-Neutral
• Java Is Portable
• Java's Performance Java was designed to adapt to an evolving
environment. New code can be loaded on the
• Java Is Multithreaded fly without recompilation. There is no need for
developers to create, and for users to install,
• Java Is Dynamic major new software versions. New features can
be incorporated transparently as needed.
Java Platform Editions

• A Java Platform Editions is the set of APIs, class


libraries, and other programs used in developing Java
programs for specific applications.
There are 3 Java Platform Editions
1. Java 2 Platform, Standard Edition (J2SE)
• Core Java Platform targeting applications running on
workstations

2. Java 2 Platform, Enterprise Edition (J2EE)


• Component-based approach to developing distributed,
multi-tier enterprise applications

3. Java 2 Platform, Micro Edition (J2ME)


• Targeted at small, stand-alone or connectable
consumer and embedded devices
Understanding JDK, JRE and JVM
Understanding JDK & JRE
JDK
 JDK is an acronym for Java Development Kit.
 It physically exists. It contains JRE and development tools.

JRE
 JRE is an acronym for Java Runtime Environment.
 It is the implementation of JVM and used to provide runtime
environment.
 It contains set of libraries and other files that JVM uses at
runtime.
Understanding JVM
 JVM (Java Virtual Machine) is an abstract machine.
 It is a specification that provides runtime environment in
which java byte code can be executed.
 JVMs are available for many hardware and software
platforms.

 The JVM performs following main tasks:


• Loads code
• Verifies code
• Executes code
• Provides runtime environment
Internal Architecture of JVM
How Java is Platform-independent?
How Java is Platform-independent?
How Java is Platform-independent?

 The source code (program) written in java is saved as a


file with .java extension.

 The java compiler “javac” compiles the source code and


produces the platform independent intermediate code
called BYTE CODE. It is a highly optimized set of
instructions designed to be executed by the JVM.
How Java is Platform-independent?
 The byte code is not native to any platform because java
compiler doesn’t interact with the local platform while
generating byte code.

 It means that the Byte code generated on Windows is


same as the byte code generated on Linux for the same
java code.

 The Byte code generated by the compiler would be saved


as a file with .class extension. As it is not generated for
any platform, can’t be directly executed on any CPU.
Java Libraries, Middle-ware,
and Database options
 java.lang
 java.util
 java.sql
 java.io
 java.nio
 java.awt
 javax.swing

You might also like