JAVA Java Introduction Java The new programming language

  • Slides: 13
Download presentation
JAVA

JAVA

Java Introduction • Java - The new programming language developed by Sun Microsystems in

Java Introduction • Java - The new programming language developed by Sun Microsystems in 1991. • Originally called Oak by James Gosling, one of the inventors of the Java Language. • Java -The name that survived a patent search • Java Authors: James , Arthur Van , and others • Java is really “C++ -- ++ “

Java Introduction • Originally created for consumer electronics (TV, VCR, Freeze, Washing Machine, Mobile

Java Introduction • Originally created for consumer electronics (TV, VCR, Freeze, Washing Machine, Mobile Phone). • Java – CPU or Platform Independent language • Internet and Web was just emerging, so Sun micro systems turned it into a language of Internet Programming. • It allows you to publish a webpage with Java code in it.

Java Features • Familiar, Simple, Small • Compiled and Interpreted • Platform-Independent and Portable

Java Features • Familiar, Simple, Small • Compiled and Interpreted • Platform-Independent and Portable • Object-Oriented • Robust and Secure • Distributed • Multithreaded and Interactive • High Performance • Dynamic and Extensible

Java Environment • Java environment includes a large number of development tools and number

Java Environment • Java environment includes a large number of development tools and number of classes and methods. • Development tools are part of the system known as Java Development Kit (JDK). • Classes and methods are part of the Java Standard Library (JSL). • JSL also known as Application Programming Interface (API).

Java Development Kit (JDK) • JDK is collection of tools used for developing and

Java Development Kit (JDK) • JDK is collection of tools used for developing and running java programs. They are • Applet viewer ( for java applets ) • Javac ( java compiler ) • Java( java interpreter ) • Javap ( java disassembler ) • Javah ( for ‘C’ header files ) • Javadoc ( for creating HTML document ) • Jdb ( java debugger )

Java Development Kit (JDK) • Appletviewer – enables us to run java applets •

Java Development Kit (JDK) • Appletviewer – enables us to run java applets • Java – java interpreter which run applets and applications by reading and interpreting byte code files. • Javac – java compiler which translates java source code to byte code files • Javah – produces header files for use of native methods • Javap – disassembler which convert byte codes into a program description • Jdb – java debugger helps us to find errors in our program

Application Programming Interface (API) • JSL or API includes hundreds of classes and methods

Application Programming Interface (API) • JSL or API includes hundreds of classes and methods grouped into several functional packages. • Packages are • Language Support Package • Utilities Package • Input / Output Package • Networking Package • AWT Package (Abstract Window Toolkit) • Applet Package

Application Programming Interface (API) • Language support package – classes and methods required for

Application Programming Interface (API) • Language support package – classes and methods required for implementing basic features of java. • Utilities package – classes to provide utility functions such as date and time functions • Input / output package – classes required for input/output manipulation • Networking package – classes for communicating with other computer via internet • AWT package – classes that implements platform – independent graphical user interface • Applet package – set of classes that allows us to create java applets

Compiled Languages Programmer Object Code Source Code Text Editor Compiler. c file Notepad, emacs,

Compiled Languages Programmer Object Code Source Code Text Editor Compiler. c file Notepad, emacs, vi Executable Code linker . o file gcc a. out file

Java is Compiled and Interpreted Hardware and Operating System Programmer Source Code Text Editor

Java is Compiled and Interpreted Hardware and Operating System Programmer Source Code Text Editor Byte Code Compiler . java file Notepad, emacs, vi Interpreter. class file javac - java - appletviewer - netscape

Total Platform Independent JAVA COMPILER (translator) JAVA BYTE CODE (same for all platforms) JAVA

Total Platform Independent JAVA COMPILER (translator) JAVA BYTE CODE (same for all platforms) JAVA INTERPRETER (one for each different system) Windows 95 Macintosh Solaris Windows NT

Process of building and running java application programs Text Editor Java Source Code javadoc

Process of building and running java application programs Text Editor Java Source Code javadoc HTML Files javah Header files javac Java class files java Java program output jdb