Upload
laurence-lester
View
246
Download
4
Embed Size (px)
Citation preview
JAVA ENVIRONMENTJDK, API, JVM
JAVA ENVIRONMENT
Java environment includes development tools and many classes and methods.
Java EnvironmentJava Environment
JDK JDK (Java Development (Java Development
Kit)Kit)
JSL JSL (Java Standard Library)(Java Standard Library)
or Application Programming or Application Programming Interface (API)Interface (API)
Development Development toolstools
Classes and Classes and methodsmethods
JDK(JAVA DEVELOPMENT KIT)(JAVA DEVELOPMENT KIT)
JDK is collection of tools used for developing and running Java programs.
They include
appletviewer - for viewing Java applets
javac - Java compiler which translates Java source code to byte code files that the interpreter can understand
java - Java interpreter which runs applets & applications by interpreting byte codes.
javadoc - Creates HTML format documentation from Java source code files
javah - Produces header files for use with methods
jdb - Java debugger, which helps to find errors in programs
These tools are used to build and run application programs.
a) To create a java program, create a source file using ___________
b) The source code is compiled using _________to ____________
c) The byte code is interpreted using ____________ and executed.
d) The jdb is used to find ______________, if any.
APIAPPLICATION PROGRAMMING INTERFACE
The API includes hundreds of classes and methods grouped into several packages.
Commonly used packages are:
java.lang Language Support Package - required for basic features of Java
jJava.util Utilities Package - classes that provide functions like date and time functions
java.io Input/Output Package - classes required for input/output
javax.swing Swing Package - common GUI elements like dialog box
java.net Networking Package - classes for communicating with other computers through network
java.awt AWT Package - classes that allow GUI elements and graphics
java.applet Applet Package - classes that allows to create Java applets
JVMJAVA VIRTUAL MACHINE
Byte code is generated for Java Virtual machine.
JVM is not a machine but a program that resides in computer memory.
The byte code is common for all machines.
Java interpreter acts as a link between particular machine and byte code to make machine code (machine language).
Java Program
Java Compiler Virtual Machine
Byte code Java Interpreter Machine code
Byte code
Virtual machine
EXERCISE
Classes and methods of Java are part of
a) JSL
b) JDK
c) JVM
EXERCISE
The tool that is present in JDK is used for viewing Java applets
a) applet viewer
b) applet
c) javac
EXERCISE
EXERCISE
The Java debugger, which helps to find errors in programs is
a) javadoc
b) jdb
c) javah
The package which has classes for communicating with other computers through network
a) Input/Output package
b) AWT package
c) Networking package