200 likes | 484 Vues
Java Programming Language. Introduction to Java. Kiyeol Ryu. Table of Contents. Brief History What is Java Java Applets and Applications Java Programming Environment. 1991 Green Project (Sun Micro Systems) Comsumer Electronics 1991 Oak language (Java) 1992 *7 - First Product
E N D
Java Programming Language Introduction to Java Kiyeol Ryu
Table of Contents • Brief History • What is Java • Java Applets and Applications • Java Programming Environment
1991 Green Project (Sun Micro Systems) Comsumer Electronics 1991 Oak language (Java) 1992 *7 - First Product 1993 CableTV Box - fail 1994 WWW에 적용 1994 HotJava Browser 1995 Sun World 95 1996 JDK 1.0.2 1997 JDK 1.1 1998 JDK 1.2 (J2SE SDK 1.2) 2000 J2SE SDK 1.3 2002 J2SE SDK 1.4 1989 WWW (CERN) concept 1993 Mosaic (NCSA) 1993 Netscape M. Adressen, J. Clark 1995 Netscape Licensed Java 1996 MicroSoft Licensed Java 1998 Motorola Licensed Java Brief History
What is Java • simple • object-oriented • distributed • interpreted • robust • secure • architecture neutral • portable • high-performance • multithreaded • dynamic Ref: J. Gosling, et. al., The Java Language, A White Paper, Sun Microsystems, 1994
Java is Simple • The syntax of Java is a cleaned-up version of the syntax for C++. • header files • pointer • unions • operator overloading • virtual base classes • typedef • stuct • explicit memory management • etc. Java C++ C
Java is Object-Oriented • Models real world entities as objects • Abstracts out data as classes • Reuses classes through inheritance
Java is Distributed • Extensive TCP/IP networking capabilities • Interactivities with protocols to retrieve information such as HTTP, FTP • Ease of accessing remote files
Java is Interpreted • The java interpreter can directly execute instructions in its object code. • Java bytecode • Architecture-neutral
Java is Robust • No pointer • Array bounds checking • Exception handling • Byte code verification
Java is Secure • With robustness • Bytecode verifier • Class loader • Sandbox model • Digital signature
Bytecode Verifier Java Source Class Loader network JIT compiler Interpreter Java Compiler Runtime Java Byte Code Java is Architecture Neutral Runtime Compile time hardware
Java is Portable • Architecture independent • Ints are always Ints and are always 32-bits 2’s complemented integers. • User interfaces via an abstract window system so the windows can be implemented on UNIX, PC and Mac
Java is Multithreaded • Many simultaneous activities in “one” program • Better interactive performance • Better real-time behavior
Java is Dynamic. • Code can be added to a running program • useful in evolving environment • Reflection capability • to analyze objects in runtime
Applying Java • Java Application • Stand-alone program • Java interpreter executes applications • Java Applet • Java code embedded in HTML documents • Java-enabled browser executes(interprets) applets • Java Servlet • Web component that generates dynamic content • Run by a web server • Java Server Page(JSP) • To develop dynamic web pages • a JSP page is an HTML page that contains java code • Run by a web server
Java Application • Sample application class HelloWorldApp { public static void main (String args[]) { System.out.println (“Hello World!”); } }
Java Program Java Compiler Java Classes (Bytecodes) Java Interpreter Results Compile and Execute • Java compiler generates Java bytecode • Java interpreter executes Java bytecode
Java Applet • Sample HTML <html> <applet code=HelloWorld.class width=100 height=100 > </applet> </html> Web Browser HTML 1 2 • load HTML • load applet • run applet Applet (Java classes) Web Server
Java Programming Environment • Java 2 Standard Edition(J2SE) SDK
Advanced Java Technology • Java Beans • Java IDL • Jini technology • Java Message System(JMS) • Enterprise Java Beans(EJB) • Java Server Pages(JSP) • ...