Presentation is loading. Please wait.

Presentation is loading. Please wait.

2.1 Introduction to Java Technology

Similar presentations


Presentation on theme: "2.1 Introduction to Java Technology"— Presentation transcript:

1 2.1 Introduction to Java Technology
ATS Application Programming: Java Programming 2.1 Introduction to Java Technology 2.1 Introduction to Java Technology ATS Application Programming: Java Programming © Accenture 2005 Course Code #Z16325

2 ATS Application Programming: Java Programming
Contents 2.1 Introduction to Java Technology History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits and Features of Java © Accenture 2005 Course Code #Z16325

3 ATS Application Programming: Java Programming
Objectives 2.1 Introduction to Java Technology Discuss a brief history of Java Define Java Differentiate Java Platforms J2EE J2SE J2ME Describe the Java Virtual Machine (JVM ) Explain the contents of the Java Development Kit (JDK) Describe benefits and features of Java © Accenture 2005 Course Code #Z16325

4 ATS Application Programming: Java Programming
Brief History of Java 2.1 Introduction to Java Technology In 1990, Sun Microsystems began an internal project known as the Green Project to work on a new technology. In 1992, the Green Project was spun off and its interest directed toward building highly interactive devices for the cable TV industry. This failed to materialize. In 1994, the focus of the original team was re-targeted, this time to the use of Internet technology. A small web browser called HotJava was written. Oak was renamed to Java after learning that Oak had already been trademarked. In 1995, Java was first publicly released. In 1996, Java Development Kit (JDK) 1.0 was released. In 2002, JDK 1.4 (codename Merlin) was released, the most widely used version. In 2004, JDK 5.0 (codename Tiger) was released, the latest version. In 1990, Sun Microsystems began an internal project known as the Green Project to work on a new technology. Its team originally considered C++ as the language to use but soon abandoned it for an entirely new language called Oak. In 1992, the Green Project was spun off and its interest directed toward building highly interactive devices for the cable TV industry. This failed to materialize. In 1994, the focus of the original team was re-targeted, this time to the use of Internet technology. A small web browser called HotJava was written. Oak was renamed to Java after learning that Oak had already been trademarked. In 1995, Java was first publicly released In 1996, Java Development Kit (JDK) 1.0 was released In 2002, JDK 1.4 (codename Merlin) was released, the most widely used version In 2004, JDK 5.0 (codename Tiger) was released, the latest version The name Java was coined at a local coffee shop frequented by some of the members. It is not clear whether the name is an acronym or not. However some accounts claim that it stands for the names of James Gosling, Arthur Van Hoff, and Andy Bechtolsheim. Others, that it is an acronym for Just Another Vague Acronym. © Accenture 2005 Course Code #Z16325

5 ATS Application Programming: Java Programming
James Gosling 2.1 Introduction to Java Technology James Gosling is generally credited as the inventor of the Java programming language He was the first designer of Java and implemented its original compiler and virtual machine He is also known as the Father of Java He is currently the Chief Technical Officer of Sun Microsystems © Accenture 2005 Course Code #Z16325

6 ATS Application Programming: Java Programming
Java Quick Facts 2.1 Introduction to Java Technology 4.5 million Java developers, the largest community of software developers 75% of professional developers in the world use Java 1.75 billion devices run in Java 825 million Java-enabled smart cards 579 million Java-enabled mobile devices 635 Java-enabled phone models 700 million desktops with Java software 220,000 downloads of JDK 1.1 in just 3 weeks, 2 million after a year 2 million downloads for J2EE SDK JavaOne draws 20,000 becoming the world’s largest developer conference Over 400 Java user groups established worldwide Java runs on consumer and embedded devices more than any other software The software that powers the Mars Rover Java is Everywhere! © Accenture 2005 Course Code #Z16325

7 ATS Application Programming: Java Programming
What is Java? 2.1 Introduction to Java Technology A multi-platform, network-centric, object-oriented programming language Multi-platform It can run on almost any computer platform Network-centric Designed with network in mind – “the network is the computer” Designed for building applications for the Internet Object-oriented It incorporates object-oriented programming model Clarify the term ‘multi-platform’. Java can run on any platform that supports Java by having a Java Runtime Environment (JRE). The major development platforms (UNIX, Windows, even some mainframes) support Java. Network-centric – Java tries to leverage the resources of computers that may reside remotely. © Accenture 2005 Course Code #Z16325

8 Java Platform Editions
ATS Application Programming: Java Programming Java Platform Editions 2.1 Introduction to Java Technology A Java Platform is the set of APIs, class libraries, and other programs used in developing Java programs for specific applications There are 3 Java Platform Editions 1. Java 2 Platform, Standard Edition (J2SE) Core Java Platform targeting applications running on workstations 2. Java 2 Platform, Enterprise Edition (J2EE) Component-based approach to developing distributed, multi-tier enterprise applications 3. Java 2 Platform, Micro Edition (J2ME) Targeted at small, stand-alone or connectable consumer and embedded devices Recognizing that one size doesn’t fit all, Sun has grouped its technologies into three editions. Java 2 Platform, Standard Edition (J2SE) The J2SE platform is a fast and secure foundation for building and deploying client-side enterprise applications. In today's .com world of nanosecond response times and information gratification, J2SE technology provides the speedy performance and high functionality that is demanded by Web users. For end users, J2SE technology enables faster and easier use of functionally rich Web applications, such as corporate intranets and interactive shopping aids for e-commerce. For enterprise developers, the improved J2SE technology serves as the base tool for creating sophisticated, valuable applications that can be brought to market quickly. Java 2 Platform, Enterprise Edition (J2EE) J2EE technology simplifies enterprise applications by basing them on standardized, modular and re-usable components called Enterprise JavaBeans™ (EJB™), providing a complete set of services to those components, and handling many details of application behavior automatically. By automating many of the time-consuming and difficult tasks of application development, J2EE technology allows enterprise developers to focus on adding value, that is, enhancing business logic, rather than building infrastructure. Java 2 Platform, Micro Edition (J2ME) J2ME technology specifically addresses the vast consumer space, which covers the range of extremely tiny commodities such as smart cards or a pager all the way up to the set-top box, an appliance almost as powerful as a computer. J2ME technology enables device manufacturers, service providers, and content creators to gain a competitive advantage and capitalize on new revenue streams by rapidly and cost-effectively developing and deploying compelling new applications and services to their customers worldwide. Each edition is a developer treasure chest of tools and supplies that can be used with a particular product. Note that there are packages developed and supported by Sun that are not part of any edition such as (java3d for 3d graphics). © Accenture 2005 Course Code #Z16325

9 Java Development Kit (JDK)
ATS Application Programming: Java Programming Java Development Kit (JDK) 2.1 Introduction to Java Technology Java Development Kit (JDK) Is a set of Java tools for developing Java programs Consists of Java API, Java Compiler, and JVM Java Application Programming Interface (API) Is prewritten code, organized into packages of similar topics Java Virtual Machine (JVM) Is an execution engine that runs compiled Java byte code Java Virtual Machine Java API MyProgram.java Hardware - Based Platform JDK JRE The Java platform is formed from two components: the Java Application Programming Interface (Java API) and the Java Virtual Machine (JVM). The Java API is a set of libraries that you can use to accomplish tasks like creating graphical user interfaces (GUIs), performing file input/output (I/O), or establishing network communication. The JVM is in charge of executing your code in a specific environment. A Java Development Kit (JDK) is a program development environment for writing Java applications. It consists of a runtime environment that "sits on top" of the operating system layer as well as the tools and programming that developers need to compile, debug, and run applications written in the Java language. The Java Runtime Environment (JRE), also known as Java Runtime, is part of the Java Development Kit (JDK), a set of programming tools for developing Java applications. The Java Runtime Environment provides the minimum requirements for executing a Java application; it consists of the Java Virtual Machine (JVM), core classes, and supporting files. © Accenture 2005 Course Code #Z16325

10 ATS Application Programming: Java Programming
How does JVM work? 2.1 Introduction to Java Technology public class HelloWorld { public static void main(String args[ ]) { System.out.println(“Hello World!”); } Source Code A Java program is written The program is compiled A class file is produced containing bytecodes The bytecodes are interpreted by the JVM The JVM translates bytecodes into native machine code Java Virtual Machine (JVM), interprets compiled Java binary code (called bytecodes) for a computer's processor (or "hardware platform") so that it can perform Java program instructions. Java was designed to allow application programs to be built that could be run on any platform without having to be rewritten or recompiled by the programmer for each separate platform. A Java virtual machine makes this possible because it is aware of the specific instruction lengths and other particularities of the platform. The Java Virtual Machine Specification defines an abstract -- rather than a real -- machine or processor. The Specification specifies an instruction set, a set of registers, a stack, a “garbage heap," and a method area. Once a Java virtual machine has been implemented for a given platform, any Java program (which, after compilation, is called bytecodes) can run on that platform. A Java virtual machine can either interpret the bytecodes one instruction at a time (mapping it to a real processor instruction) or the bytecodes can be compiled further for the real processor using what is called a just-in-time compiler. Java is Compiled Once but can be Interpreted Dynamically Java source code is passed to a compiler that generates the bytecode. The bytecode is not targeted at any specific platform. Instead, a Java Virtual Machine(JVM) interprets the bytecode at runtime and executes it. This means that only the JVM itself is platform-dependent; the bytecode of your Java programs remains platform-independent. This is different than a truly compiled language like C or C++. In a compiled language, platform-dependent information must be linked into the compiled code, forcing one compiled version for every target platform. If you write a program to calculate the distances of stars from each other and want it to run on Microsoft Windows, Linux, Sun Solaris, and Macintosh, you would have to compile it four times, once for each system. The significant drawback with an interpreted language like Java is that code being dynamically interpreted executes more slowly than code that is compiled and native to a particular platform. Although this fundamental fact may be true, the JVM has been augmented over the years to become the Java HotSpot Virtual Machine (Java HotSpot VM). The HotSpot VM contains an adaptive compiler that allows performance hot spots be detected at runtime and optimized while your code is executing. This results in faster running code that still gains the benefits of being interpreted. Nowadays, properly designed Java programs execute at speeds comparable to similar program written in C++. In essence, the one black mark of being interpreted has been removed completely. Compiler Class File Bytecodes Java Virtual Machine Native Machine Code © Accenture 2005 Course Code #Z16325

11 Running on Different Platforms
ATS Application Programming: Java Programming Running on Different Platforms 2.1 Introduction to Java Technology class HelloWorld { public static void main(String args[ ]) { System.out.println(“Hello World!”); } Java Program Compiler Hello World! Win32 Interpreter Hello World! Solaris Interpreter Hello World! MacOS Interpreter Java is Portable In the past, portability was not as much of a concern as it has become today. Most applications were fairly static in the sense that they were deployed on a consistent platform and did not require a lot of changes and tinkering to keep them running. However, in modern systems it is not at all uncommon for many components to be distributed across various hardware, operating systems, and networks. This heterogeneousness would pose great problems for many languages, but not Java! Java applications can run practically anywhere. This makes Java quite revolutionary. Essentially anything that has some kind of processor can be Java-enabled, from mainframes to personal computers to telephones and beyond. Java programs are flexible enough to be local applications, web-based applets, server-side applications, and embedded software. The application code does not usually have to be changed to run on these different devices either. This means you can truly write the code once and run it anywhere you wish. The key to this portability is the interpreted nature of the language. Since code does not have to be compiled to specific platforms, your Java program can be anywhere a JVM exists. The world does not run on one type of platform alone and new platforms are constantly being introduced. By being portable, java programs written today can still be viable tomorrow. © Accenture 2005 Course Code #Z16325

12 Key Benefits & Features of Java
ATS Application Programming: Java Programming Key Benefits & Features of Java 2.1 Introduction to Java Technology Write Once, Run Anywhere Java is portable and platform independent Network-centric Can work with resources across a network and multi-tier architectures Object-oriented A Java program models a set of objects interacting with each other Robust Strong type checking Exception handling mechanism Automatic memory management Multithreaded A Java application can run several different processes called “threads” simultaneously Security Can download remote code over a network and run it in a secure environment Security levels and restrictions are highly configurable © Accenture 2005 Course Code #Z16325

13 ATS Application Programming: Java Programming
Key Points 2.1 Introduction to Java Technology Java is multi-platform, network-centric, object-oriented programming language. James Gosling is the inventor of Java. There are three platforms of Java: J2SE, J2EE, J2ME. JDK is a set of tools for developing Java applications. JVM interprets Java programs and allows them to run on any platform. Java is portable, robust, multithreaded, and secured. © Accenture 2005 Course Code #Z16325

14 Questions and Comments
ATS Application Programming: Java Programming Questions and Comments 2.1 Introduction to Java Technology ??? © Accenture 2005 Course Code #Z16325


Download ppt "2.1 Introduction to Java Technology"

Similar presentations


Ads by Google