Download presentation
Presentation is loading. Please wait.
Published bySilas McCormick Modified over 9 years ago
1
L EC. 01: J AVA FUNDAMENTALS Fall. 2014 0 Java Programming
2
C ONTENTS Brief history of Java Features of Java JDK, JRE, JVM and bytecode Developing and executing Java programs Basic syntax and semantics of Java Fall. 2014 1 Java Programming
3
J AVA TECHNOLOGY Java technology is a software-only platform running on top of other hardware-based platforms. Including Java programming language A general-purpose, concurrent, strongly typed, class-based object- oriented language Tools Compiler, debugger, documentation tool, launcher, web service, … Application Programming Interfaces (APIs) Large amount ready-made software components to make programming easier Deployment methodology Java Web Start, Java plug-in Integration libraries JDBC, JNDI, Java RMI Java Virtual Machine (JVM) Fall. 2014 2 Java Programming
4
Fall. 2014 Java Programming 3
5
P AST OF J AVA Conceived by a design team of Sun Microsystems in 1991 Original language goal A platform-independent language that could be used to create software to be embedded in various consumer electronic devices Switching to Internet programming with the emergence of the World Wild Web The syntax and object model of Java inherits from C and C++ respectively. Fall. 2014 4 Java Programming
6
F EATURES OF J AVA INCLUDING … Highly portable Highly dynamic Suitable for distributed architectures Highly secure Object-oriented Robust Hybrid of compiling and interpreting Multithreaded Fall. 2014 5 Java Programming The secret to make Java platform- independent and secure is the JVM (Java Virtual Machine) and Java bytecode.
7
T YPES OF J AVA PROGRAMS Based on the usages and runtime environments, Java programs are classified as: Stand-alone programs Java applets Java servelets JavaBeans The syntactic and semantic rules are the same for these four types of Java programs. The differences among them are the APIs required to develop and execute programs. Fall. 2014 6 Java Programming
8
S TAND - ALONE J AVA PROGRAMS A stand-alone Java program (also called Java application) can be only executed on the computer where the program is stored. Two types of stand-alone programs Console mode Window mode Fall. 2014 7 Java Programming
9
J AVA APPLETS An applet is a special kind of Java program that is designed to be transmitted over the Internet and automatically executed by a Java-compatible web browser. An applet is downloaded automatically when users click hyperlink containing applets, without further interaction with the user. Applets are small programs which are typically used to display data provided by the server, handle user input, or provide simple functions, such as a loan calculator, that execute locally, rather than on the server. Applets greatly reduce the load of servers. Fall. 2014 8 Java Programming
10
J AVA SERVELETS A java servlet runs within a Web server which receives and responds to requests from Web clients, where the requests are transmitted via HTTP (Hyper Text Transport Protocol). Fall. 2014 9 Java Programming
11
J AVABEANS A bean is a Java class with method names that follow the JavaBeans API specifications. Since all the beans follow the same specifications, they are easily to be integrated with other programs. For example, all the Java classes supported by IDE (Integrated Development Environment), such as Eclipse and NetBeans, are Java beans. A bean is used as a help class, instead of a driven class. A help class is used to provide specific functions such as JButton, JFrame. A driven class is used to control the process of a task. Fall. 2014 10 Java Programming
12
JDK Java Development Kit (JDK) is a collection of software which constructs an environment for developing Java programs. JDK editions Java Standard Edition (J2SE) J2SE can be used to develop client-side standalone applications or applets. Java Enterprise Edition (J2EE) J2EE can be used to develop server-side applications such as Java servlets and Java ServerPages. Java Micro Edition (J2ME) J2ME can be used to develop applications for mobile devices such as cell phones. Fall. 2014 11 Java Programming
13
JRE The JRE (Java Runtime Environment) is a collection of software which creates an environment for running Java program. The JRE consists of the Java Virtual Machine (JVM), Java platform core classes, and supporting Java platform libraries. Fall. 2014 12 Java Programming
14
J AVA BYTECODE AND JVM Java bytecode is a intermediate language, instead of the executable code of any specific platform, generated from Java compiler. Currently, some other languages, such as Python and Ada, can be translated into Java bytecode. JVM is a virtual machine (i.e. a software implemented abstraction of a specific underlying platform) which supports the running environment for interpreting Java bytecodes. JVMs may be developed by any company as long as it adhere to the JVM specification published by Oracle Corporation and to related contractual obligations. To execute Java bytecodes, they are either interpreted by JVM or translated to native language, by using JIT (Just-In-Time) compiler, for execution. Fall. 2014 13 Java Programming
15
Fall. 2014 Java Programming 14 The output of the compiler is.class file
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.