JAVA - An Overview
JAVA - An Overview
JAVA COMPILER
(translator)
JAVA INTERPRETER
(one for each different system)
Java Applet
Java Applet
Server
The Java programming
environment
• Java programming language specification
– Syntax of Java programs
– Defines different constructs and their semantics
• Java byte code: Intermediate representation for Java programs
• Java compiler: Transform Java programs into Java byte code
• Java interpreter: Read programs written in Java byte code and execute
them
• Java virtual machine: Runtime system that provides various services
to running programs
• Java programming environment: Set of libraries that provide services
such as GUI, data structures,etc.
• Java enabled browsers: Browsers that include a JVM + ability to load
programs from remote hosts
11
Applets, Servlets and
Applications
• An applet is designed to be embedded in a
Web page, and run by a browser
• Applets run in a sandbox with numerous
restrictions; for example, they can’t read
files and then use the network
• A servlet is designed to be run by a web
server
• An application is a conventional program
Java on the Web: Java Applets
• Clients download applets via Web browser
• Browser runs applet in a Java Virtual
Machine Applet
(JVM)
Client
Server
Servlets
Client
Server
EJB
JDBC
Applets and GUI
AWT & Applets
An Applet is a Java program capable of running from within a web page
(HTML document)
new
wait()
start() sleep()
suspend()
blocked
runnable non-runnable
notify()
stop() slept
resume()
unblocked
dead
Threading Mechanisms...
• Create a class that extends the Thread class
• Create a class that implements the Runnable interface
Threads in Action...
Multithreaded Server
Server Process
Client Process
Server
Threads
Client Process
User Mode
Kernel Mode
Message Passing
Facility
Just to Summarize