SlideShare uma empresa Scribd logo
1 de 85
Baixar para ler offline
Java Programming
Language Overview


                   Bok, Jong Soon
          Jongsoon.bok@gmail.com
              www.javaexpert.co.kr
What is Java Technology?

 Is a programming language.
 Is a platform.
Java Programming Language
 Is one of today’s most popular software-
 development languages.
 Is used not only for Web programming, but also for
 developing standalone applications across
 platforms on servers, desktops, and mobile devices,
 even control the robotic rover that rolled on Mars.
 Is a high-level language.
The Java Platform
 Platform : The hardware or software environment in
 which a program runs.
 Has two components:
   The Java Virtual Machine
   The Java Application Programming Interface (API)




                                          From : [Java Pocket Guide], Robert
                                          Liguori ; Patricia Liguori, O’Reilly, 2008,
                                          978-0-59-651419-8, p191
The Java Platform (Cont.) - JRE

 Java Runtime Environment
 Provides the backbone for running Java application.
 Is a collection of software.
 Allows a computer system to run a Java application.
 Consists of
    JVMs, Java Virtual Machines, interpret Java bytecode into
   machine code.
   Standard class libraries
   User interface toolkits
   A variety of utilities.
The Java Platform (Cont.) - JDK

 Java Development Kit
 Provides all of the components and necessary
 resources to develop Java applications.
 Is a programming environment for compiling,
 debugging, and running Java applets, applications,
 and Java Beans.
 Includes the JRE, Java Programming language,
 development tools and tool APIs.
 Supports Linux, Solaris, and Microsoft Windows.
 Refer to http://java-virtual-machine.net/other.html
The Java Platform (Cont.) - JDK
  Download the most recent version at
  http://java.sun.com
  Download older versions at
  http://java.sun.com/products/archive
Java Development Kits            Codename           Release
Java SE 6 with JDK 1.6.0         Mustang            2006
Java 2 SE 5.0 with JDK 1.5.0     Tiger              2004
Java 2 SE with SDK 1.4.0         Merlin             2002
Java 2 SE with SDK 1.3           Kestrel            2000
Java 2 with SDK 1.2              Playground         1998
                 Table 1-1. Java Development Kits
Java SE Code Names
Version              Code Name    Release Date
JDK 1.1.4            Sparkler     1997. 10. 11
JDK 1.1.5            Pumpkin      1997. 11. 03
JDK 1.1.6            Abigail      1998. 04. 24
JDK 1.1.7            Brutus       1998. 09. 28
JDK 1.1.8            Chelsea      1999. 04. 08
J2SE 1.2             Playground   1998. 11 04
J2SE 1.2.1           (none)       1999. 03. 30
J2SE 1.2.2           Cricket      1999. 07. 08
J2SE 1.3             Kestrel      2000. 08. 05
J2SE 1.3.1           Ladybird     2001. 05. 17
J2SE 1.4.0           Merlin       2002. 02. 13
J2SE 1.4.1           Hopper       2002. 09. 16
J2SE 1.4.2           Mantis       2003. 06. 26
Java SE 5.0(1.5.0)   Tiger        2004. 09. 29
Java SE 6.0(1.6.0)   Mustang      2005. 11. 20
Java SE 7.0(1.7.0)   Dolphin      yet
The Origin of the Java Programming
Language
  Originally named Oak, designed in 1991.
  Main team members : Bill Joy, Patrick Naughton, Mike
  Sheridan, James Gosling.
  Original goal : use in embedded consumer electronic
  appliances.
  In 1994, team realized Oak was perfect for Internet.
  In 1995, renamed Java, was redesigned for developing
  Internet applications.
  Announced in May 23 in 1995 at SunWorld’95.
  First non-beta release January 23 in 1996.
  Refer to http://java.sun.com/features/2000/06/time-
  line.html
  See also
  http://java.sun.com/features/1998/05/birthday.html
Java Language Features

•   Simple             • Architecture neutral
•   Object-Oriented • Portable
•   Distributed        • High performance
•   Multithreaded      • Robust
•   Dynamic            • Secure
•   Write Once, Run AnywhereTM
•   http://java.sun.com/docs/white/langenv/
Figure 1.1 J2SE vs. J2EE vs. J2ME
Figure 1.2 Java SE 6 Platform at a Glance




      ※ http://java.sun.com/javase/technologies/index.jsp
Programming the First Java code

To write your first program, you need:
  The JavaTM 6 Platform, Standard Edition.
    Download the JDK, not the JRE.
    Download API Specifications & Documentation.
    Consult the installation instructions .
  A Text Editor.
  IDE (Integrated Development Environment)
  tools - Option
Downloading JDK 6 Update 23 for
Windows Platform
 Connect to http://java.sun.com/
Downloading JDK 6 (Cont.)
Downloading JDK 6 (Cont.)
Downloading JDK 6 (Cont.)
Downloading JDK 6 (Cont.)
Downloading JDK 6 (Cont.)
Installing JDK 6
Installing JDK 6 (Cont.)
Installing JDK 6 (Cont.)
Installing JDK 6 (Cont.)
Installing JDK 6 (Cont.)
Configuring JDK Environment
Configuring JDK Environment (Cont.)
Configuring JDK Environment (Cont.)
Configuring JDK Environment (Cont.)
Configuring JDK Environment (Cont.)
Testing JDK Environment
Testing JDK Environment (Cont.)
 Connect to http://java.com/ko/download/installed.jsp
Downloading SDK Documentation
 Connect to
 http://www.oracle.com/technetwork/java/javase/downloads/index.html
Downloading SDK Documentation
(Cont.)
Downloading SDK Documentation
(Cont.)
Downloading SDK Documentation
(Cont.)
Unzipping SDK Documentation
Moving SDK Documentation
Registering SDK Documentation on
Windows XP
Registering SDK Documentation on
Windows XP (Cont.)
Registering SDK Documentation on
Windows XP (Cont.)
Registering SDK Documentation on
Windows XP (Cont.)
Downloading JDK 6 Update 23 for
Linux Platform
Downloading JDK 6 (Cont.)
Downloading JDK 6 (Cont.)
Downloading JDK 6 (Cont.)
Downloading JDK 6 (Cont.)
Downloading JDK 6 (Cont.)
Downloading JDK 6 (Cont.)
Downloading JDK 6 (Cont.)
Installation JDK 6
Installation JDK 6 (Cont.)
Installation JDK 6 (Cont.)
Moving JDK 6
Configuration JDK 6 (Cont.)
Configuration JDK 6 (Cont.)
JDK , API Specifications

 Java Software Development Kit (JDK)
   J2SE 6.0
   J2SE 5.0
   J2SE 1.4.2
 API Specifications
   J2SE 6.0
   J2SE 5.0
   J2SE 1.4.2
Text Editor

 vi




 Notepad
Text Editor - UltraEdit
 UltraEdit-32 v15.10 (http://www.ultraedit.com/) –
 shareware, 14.64MB
Text Editor - AcroEdit

 AcroEdit v0.9.20.92 – (http://www.acrosoft.pe.kr/) –
 Freeware, 4.08MB
Text Editor - EditPlus
 EditPlus v3.11 – (http://www.editplus.com/) –
 Shareware, 1.00MB
Java Text Editor - JavaEditor
 Java-Editor v9.00
 (http://lernen.bildung.hessen.de/informatik/javaedito
 r/index.htm )
Java Text Editor – JCreator

 JCreator Pro v4.50 (http://www.jcreator.com/)
Java Text Editor - eclipse
 Eclipse v3.5 (http://www.eclipse.org/)
Java Text Editor - IntelliJ
 IntelliJ IDEA 7.0 (http://www.jetbrains.com/)
IDE Tools - NetBeans
 NetBeans IDE 6.5 (http://www.netbeans.org/)
IDE Tools - JBuilder

 JBuilder 2008 (http://www.borland.com/)
IDE Tools - JDeveloper
 Jdeveloper 11g
 (http://www.oracle.com/technology/products/jdev/index.html/)
Etc Tools

  Code Warrior by Metrowerks :
  http://www.metrowerks.com
  TextPad Editor : http://www.textpad.com
  JEdit : http://www.jedit.org
  JGrasp : http://www.jgrasp.org
  BlueJ : http://www.bluej.org
  DrJava : http://drjava.sourceforge.net
Java Programming Development
Process
Java Programming Development
Process (Cont.)
1. Create a source file
2. Compile the source file into a bytecode file
3. Run the program contained in the
   bytecode file
Creating a Source Code –
HelloWorld.java
Compiling the Source Code –
HelloWorld.java

 Java Compiler – javac.exe
Interpreting the bytecode –
HelloWorld.class
  Java Interpreter – java.exe
Command Line Tools

 JDK provides several command-line tools.
 Commonly used tools is a compiler,
 launcher/interpreter, archiver, documenter.
 Refer to
 http://java.sun.com/javase/6/docs/technotes/tools
Command Line Tools - Compiler
 Translates Java source files into Java bytecode.
 Creates a bytecode file with the same name as the
 source file but with the .class extension.
 javac [-options] [source files]
    javac HelloWorld.java
    javac –cp ./dir/classes/ HelloWorld.java
    javac –d ./opt/hwapp/classes HelloWorld.java
    javac –source 1.4 HelloWorld.java
    javac –version
    javac –help
 Refer to http://www.javaexpert.co.kr/entry/22
 Refer to
 http://pllab.kw.ac.kr/j2seAPIs/tooldocs/windows/java.html
Command Line Tools - Interpreter
 Handles the program execution, including launching
 the application.
 java [-options] class [arguments…] or
 java [-options] –jar jarfile [arguments…]
    java HelloWorld
    java –cp .:./dir/Classes HelloWorld
    java –ea HelloWorld
    java –version
    java –help
    javaw <classname>
 Refer to http://javaexpert.co.kr/entry/23
 Refer to
 http://pllab.kw.ac.kr/j2seAPIs/tooldocs/windows/java.html
Command Line Tools - Packager
 JAR, Java Archive, utility is an archiving and compression
 tool.
 Used to combine multiple files into a single file called a JAR
 file.
 JAR consists of a ZIP archive containing a manifest file (JAR
 content describer) and optional signature files (for security).
 jar [options] [jar-file] [manifest-files]
 [entry-point] [-C dir] files…
    jar cf files.jar HelloWorld.java kr/co/javaexpert/HelloWorld.class
    jar tfv files.jar
    jar xf files.jar
 Refer to http://javaexpert.co.kr/entry/24
 Refer to
 http://pllab.kw.ac.kr/j2seAPIs/tooldocs/windows/jar.html
Command Line Tools – JAR
Execution
     Can be created to be executable.
     Specifies the file within the JAR where the ‘main’
     class resides.
     Refer to http://javaexpert.co.kr/entry/25
1.   Compile .java file with package option.
2.   Create a file Manifest.txt using editor.
3.   Create a JAR file that adds the Manifest.txt contents
     to the manifest file, MANIFEST.MF.
4.   Display the contents of the JAR file.
5.   Execute the JAR file using java –jar option.
Figure 1.3. shows an examples of this basic
communication.




Applications: Text editor   Browser
                  Operating system
                     Hardware
Figure 1.4. Computer Communication
Problem




Applications: Text editor   Browser   Other apps
                  Operating system
                     Hardware
How Java Technology Solves the
Communication Problem
 Uses compiling and interpretation.
 A little slower than compiled programs, but runs on
 any operating system.
 Compiles source code to bytecode.
 Uses Java virtual machine (JVMTM), interprets
 bytecode.
 Uses a different JVM for every operating system.
Figure 1.5. How the JVM Interacts With the
Operating System and Java Applets




                           Applets         Java apps
   Applications: Text editor JVM Browser     JVM
                     Operating system
                         Hardware
Java API Documentation

 Detailed information API
 Very valuable resource: download,or view online at:
 http://java.sun.com/javase/6/docs/api/index.html
Figure 1.6. Java 2 Platform Specification,
java.lang Package, Boolean Class
Additional Resource

 Java Technology : An Early History
   http://java.sun.com/features/1998/05/birthday.html


 Java Technology In The Real World
   http://java.sun.com/nav/used/index.html

Mais conteúdo relacionado

Mais procurados

Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Mr. Akaash
 
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaWhat Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaEdureka!
 
Genesis and Overview of Java
Genesis and Overview of Java Genesis and Overview of Java
Genesis and Overview of Java Ravi_Kant_Sahu
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Languagejaimefrozr
 
JAVA ENVIRONMENT
JAVA  ENVIRONMENTJAVA  ENVIRONMENT
JAVA ENVIRONMENTjosemachoco
 
Java Presentation
Java PresentationJava Presentation
Java Presentationaitrichtech
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javaSaba Ameer
 
Introduction to Basic Java Versions and their features
Introduction to Basic Java Versions and their featuresIntroduction to Basic Java Versions and their features
Introduction to Basic Java Versions and their featuresAkash Badone
 
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...Edureka!
 
Core java complete ppt(note)
Core java  complete  ppt(note)Core java  complete  ppt(note)
Core java complete ppt(note)arvind pandey
 
Learn Java with Dr. Rifat Shahriyar
Learn Java with Dr. Rifat ShahriyarLearn Java with Dr. Rifat Shahriyar
Learn Java with Dr. Rifat ShahriyarAbir Mohammad
 
Core Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsCore Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsMahika Tutorials
 
Eclipse introduction IDE PRESENTATION
Eclipse introduction IDE PRESENTATIONEclipse introduction IDE PRESENTATION
Eclipse introduction IDE PRESENTATIONAYESHA JAVED
 
Enterprise Java Beans - EJB
Enterprise Java Beans - EJBEnterprise Java Beans - EJB
Enterprise Java Beans - EJBPeter R. Egli
 
Training on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan SanidhyaTraining on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan SanidhyaShravan Sanidhya
 

Mais procurados (20)

Jdk,jre,jvm
Jdk,jre,jvmJdk,jre,jvm
Jdk,jre,jvm
 
Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...
 
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaWhat Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
 
Genesis and Overview of Java
Genesis and Overview of Java Genesis and Overview of Java
Genesis and Overview of Java
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
 
JAVA ENVIRONMENT
JAVA  ENVIRONMENTJAVA  ENVIRONMENT
JAVA ENVIRONMENT
 
Java Presentation
Java PresentationJava Presentation
Java Presentation
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Introduction to Basic Java Versions and their features
Introduction to Basic Java Versions and their featuresIntroduction to Basic Java Versions and their features
Introduction to Basic Java Versions and their features
 
Tomcat
TomcatTomcat
Tomcat
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
 
Spring ppt
Spring pptSpring ppt
Spring ppt
 
Core java complete ppt(note)
Core java  complete  ppt(note)Core java  complete  ppt(note)
Core java complete ppt(note)
 
Learn Java with Dr. Rifat Shahriyar
Learn Java with Dr. Rifat ShahriyarLearn Java with Dr. Rifat Shahriyar
Learn Java with Dr. Rifat Shahriyar
 
Core Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsCore Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika Tutorials
 
Spring notes
Spring notesSpring notes
Spring notes
 
Eclipse introduction IDE PRESENTATION
Eclipse introduction IDE PRESENTATIONEclipse introduction IDE PRESENTATION
Eclipse introduction IDE PRESENTATION
 
Enterprise Java Beans - EJB
Enterprise Java Beans - EJBEnterprise Java Beans - EJB
Enterprise Java Beans - EJB
 
Training on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan SanidhyaTraining on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan Sanidhya
 

Destaque

Intuit commissions manager
Intuit commissions managerIntuit commissions manager
Intuit commissions managersshhzap
 
Jena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for JavaJena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for JavaAleksander Pohl
 
Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technologysshhzap
 
Java session01
Java session01Java session01
Java session01Niit Care
 
Object Oriented Programming with Java
Object Oriented Programming with JavaObject Oriented Programming with Java
Object Oriented Programming with JavaJussi Pohjolainen
 
Object-Oriented Analysis And Design With Applications Grady Booch
Object-Oriented Analysis And Design With Applications Grady BoochObject-Oriented Analysis And Design With Applications Grady Booch
Object-Oriented Analysis And Design With Applications Grady BoochSorina Chirilă
 

Destaque (8)

Java Basics
Java BasicsJava Basics
Java Basics
 
Intuit commissions manager
Intuit commissions managerIntuit commissions manager
Intuit commissions manager
 
Jena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for JavaJena – A Semantic Web Framework for Java
Jena – A Semantic Web Framework for Java
 
Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technology
 
Java session01
Java session01Java session01
Java session01
 
02 basic java programming and operators
02 basic java programming and operators02 basic java programming and operators
02 basic java programming and operators
 
Object Oriented Programming with Java
Object Oriented Programming with JavaObject Oriented Programming with Java
Object Oriented Programming with Java
 
Object-Oriented Analysis And Design With Applications Grady Booch
Object-Oriented Analysis And Design With Applications Grady BoochObject-Oriented Analysis And Design With Applications Grady Booch
Object-Oriented Analysis And Design With Applications Grady Booch
 

Semelhante a Chapter 1. java programming language overview

Object Oriented Programming-JAVA
Object Oriented Programming-JAVAObject Oriented Programming-JAVA
Object Oriented Programming-JAVAHome
 
Basics of JAVA programming
Basics of JAVA programmingBasics of JAVA programming
Basics of JAVA programmingElizabeth Thomas
 
01. Introduction to programming with java
01. Introduction to programming with java01. Introduction to programming with java
01. Introduction to programming with javaIntro C# Book
 
JRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVAJRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVAMehak Tawakley
 
Intoduction to java
Intoduction to javaIntoduction to java
Intoduction to javajalinder123
 
Dr. Rajeshree Khande :Intoduction to java
Dr. Rajeshree Khande :Intoduction to javaDr. Rajeshree Khande :Intoduction to java
Dr. Rajeshree Khande :Intoduction to javaDrRajeshreeKhande
 
JAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptxJAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptxMurugesh33
 
JAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptxJAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptxMurugesh33
 
JAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxJAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxDrPreethiD1
 
Introduction to java programming tutorial
Introduction to java programming   tutorialIntroduction to java programming   tutorial
Introduction to java programming tutorialjackschitze
 
Best java courses in navi mumbai best classes for java in navi mumbai-java cl...
Best java courses in navi mumbai best classes for java in navi mumbai-java cl...Best java courses in navi mumbai best classes for java in navi mumbai-java cl...
Best java courses in navi mumbai best classes for java in navi mumbai-java cl...anshkhurana01
 

Semelhante a Chapter 1. java programming language overview (20)

1- Introduction to java
1- Introduction to java1- Introduction to java
1- Introduction to java
 
Object Oriented Programming-JAVA
Object Oriented Programming-JAVAObject Oriented Programming-JAVA
Object Oriented Programming-JAVA
 
Java basics
Java basicsJava basics
Java basics
 
Presentation on Java Basic
Presentation on Java BasicPresentation on Java Basic
Presentation on Java Basic
 
Basics of JAVA programming
Basics of JAVA programmingBasics of JAVA programming
Basics of JAVA programming
 
Java - At a glance
Java - At a glanceJava - At a glance
Java - At a glance
 
01. Introduction to programming with java
01. Introduction to programming with java01. Introduction to programming with java
01. Introduction to programming with java
 
Java ppt1
Java ppt1Java ppt1
Java ppt1
 
Learn Java Part 1
Learn Java Part 1Learn Java Part 1
Learn Java Part 1
 
Java -lec-1
Java -lec-1Java -lec-1
Java -lec-1
 
JRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVAJRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVA
 
Java Fundamentals
Java FundamentalsJava Fundamentals
Java Fundamentals
 
Intoduction to java
Intoduction to javaIntoduction to java
Intoduction to java
 
Dr. Rajeshree Khande :Intoduction to java
Dr. Rajeshree Khande :Intoduction to javaDr. Rajeshree Khande :Intoduction to java
Dr. Rajeshree Khande :Intoduction to java
 
JAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptxJAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptx
 
JAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptxJAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptx
 
JAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxJAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptx
 
Introduction to java programming tutorial
Introduction to java programming   tutorialIntroduction to java programming   tutorial
Introduction to java programming tutorial
 
Best java courses in navi mumbai best classes for java in navi mumbai-java cl...
Best java courses in navi mumbai best classes for java in navi mumbai-java cl...Best java courses in navi mumbai best classes for java in navi mumbai-java cl...
Best java courses in navi mumbai best classes for java in navi mumbai-java cl...
 
1 .java basic
1 .java basic1 .java basic
1 .java basic
 

Último

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Último (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Chapter 1. java programming language overview

  • 1. Java Programming Language Overview Bok, Jong Soon Jongsoon.bok@gmail.com www.javaexpert.co.kr
  • 2. What is Java Technology? Is a programming language. Is a platform.
  • 3. Java Programming Language Is one of today’s most popular software- development languages. Is used not only for Web programming, but also for developing standalone applications across platforms on servers, desktops, and mobile devices, even control the robotic rover that rolled on Mars. Is a high-level language.
  • 4. The Java Platform Platform : The hardware or software environment in which a program runs. Has two components: The Java Virtual Machine The Java Application Programming Interface (API) From : [Java Pocket Guide], Robert Liguori ; Patricia Liguori, O’Reilly, 2008, 978-0-59-651419-8, p191
  • 5. The Java Platform (Cont.) - JRE Java Runtime Environment Provides the backbone for running Java application. Is a collection of software. Allows a computer system to run a Java application. Consists of JVMs, Java Virtual Machines, interpret Java bytecode into machine code. Standard class libraries User interface toolkits A variety of utilities.
  • 6. The Java Platform (Cont.) - JDK Java Development Kit Provides all of the components and necessary resources to develop Java applications. Is a programming environment for compiling, debugging, and running Java applets, applications, and Java Beans. Includes the JRE, Java Programming language, development tools and tool APIs. Supports Linux, Solaris, and Microsoft Windows. Refer to http://java-virtual-machine.net/other.html
  • 7. The Java Platform (Cont.) - JDK Download the most recent version at http://java.sun.com Download older versions at http://java.sun.com/products/archive Java Development Kits Codename Release Java SE 6 with JDK 1.6.0 Mustang 2006 Java 2 SE 5.0 with JDK 1.5.0 Tiger 2004 Java 2 SE with SDK 1.4.0 Merlin 2002 Java 2 SE with SDK 1.3 Kestrel 2000 Java 2 with SDK 1.2 Playground 1998 Table 1-1. Java Development Kits
  • 8. Java SE Code Names Version Code Name Release Date JDK 1.1.4 Sparkler 1997. 10. 11 JDK 1.1.5 Pumpkin 1997. 11. 03 JDK 1.1.6 Abigail 1998. 04. 24 JDK 1.1.7 Brutus 1998. 09. 28 JDK 1.1.8 Chelsea 1999. 04. 08 J2SE 1.2 Playground 1998. 11 04 J2SE 1.2.1 (none) 1999. 03. 30 J2SE 1.2.2 Cricket 1999. 07. 08 J2SE 1.3 Kestrel 2000. 08. 05 J2SE 1.3.1 Ladybird 2001. 05. 17 J2SE 1.4.0 Merlin 2002. 02. 13 J2SE 1.4.1 Hopper 2002. 09. 16 J2SE 1.4.2 Mantis 2003. 06. 26 Java SE 5.0(1.5.0) Tiger 2004. 09. 29 Java SE 6.0(1.6.0) Mustang 2005. 11. 20 Java SE 7.0(1.7.0) Dolphin yet
  • 9. The Origin of the Java Programming Language Originally named Oak, designed in 1991. Main team members : Bill Joy, Patrick Naughton, Mike Sheridan, James Gosling. Original goal : use in embedded consumer electronic appliances. In 1994, team realized Oak was perfect for Internet. In 1995, renamed Java, was redesigned for developing Internet applications. Announced in May 23 in 1995 at SunWorld’95. First non-beta release January 23 in 1996. Refer to http://java.sun.com/features/2000/06/time- line.html See also http://java.sun.com/features/1998/05/birthday.html
  • 10. Java Language Features • Simple • Architecture neutral • Object-Oriented • Portable • Distributed • High performance • Multithreaded • Robust • Dynamic • Secure • Write Once, Run AnywhereTM • http://java.sun.com/docs/white/langenv/
  • 11. Figure 1.1 J2SE vs. J2EE vs. J2ME
  • 12. Figure 1.2 Java SE 6 Platform at a Glance ※ http://java.sun.com/javase/technologies/index.jsp
  • 13. Programming the First Java code To write your first program, you need: The JavaTM 6 Platform, Standard Edition. Download the JDK, not the JRE. Download API Specifications & Documentation. Consult the installation instructions . A Text Editor. IDE (Integrated Development Environment) tools - Option
  • 14. Downloading JDK 6 Update 23 for Windows Platform Connect to http://java.sun.com/
  • 15. Downloading JDK 6 (Cont.)
  • 16. Downloading JDK 6 (Cont.)
  • 17. Downloading JDK 6 (Cont.)
  • 18. Downloading JDK 6 (Cont.)
  • 19. Downloading JDK 6 (Cont.)
  • 21. Installing JDK 6 (Cont.)
  • 22. Installing JDK 6 (Cont.)
  • 23. Installing JDK 6 (Cont.)
  • 24. Installing JDK 6 (Cont.)
  • 31. Testing JDK Environment (Cont.) Connect to http://java.com/ko/download/installed.jsp
  • 32. Downloading SDK Documentation Connect to http://www.oracle.com/technetwork/java/javase/downloads/index.html
  • 39. Registering SDK Documentation on Windows XP (Cont.)
  • 40. Registering SDK Documentation on Windows XP (Cont.)
  • 41. Registering SDK Documentation on Windows XP (Cont.)
  • 42. Downloading JDK 6 Update 23 for Linux Platform
  • 43. Downloading JDK 6 (Cont.)
  • 44. Downloading JDK 6 (Cont.)
  • 45. Downloading JDK 6 (Cont.)
  • 46. Downloading JDK 6 (Cont.)
  • 47. Downloading JDK 6 (Cont.)
  • 48. Downloading JDK 6 (Cont.)
  • 49. Downloading JDK 6 (Cont.)
  • 56. JDK , API Specifications Java Software Development Kit (JDK) J2SE 6.0 J2SE 5.0 J2SE 1.4.2 API Specifications J2SE 6.0 J2SE 5.0 J2SE 1.4.2
  • 57. Text Editor vi Notepad
  • 58. Text Editor - UltraEdit UltraEdit-32 v15.10 (http://www.ultraedit.com/) – shareware, 14.64MB
  • 59. Text Editor - AcroEdit AcroEdit v0.9.20.92 – (http://www.acrosoft.pe.kr/) – Freeware, 4.08MB
  • 60. Text Editor - EditPlus EditPlus v3.11 – (http://www.editplus.com/) – Shareware, 1.00MB
  • 61. Java Text Editor - JavaEditor Java-Editor v9.00 (http://lernen.bildung.hessen.de/informatik/javaedito r/index.htm )
  • 62. Java Text Editor – JCreator JCreator Pro v4.50 (http://www.jcreator.com/)
  • 63. Java Text Editor - eclipse Eclipse v3.5 (http://www.eclipse.org/)
  • 64. Java Text Editor - IntelliJ IntelliJ IDEA 7.0 (http://www.jetbrains.com/)
  • 65. IDE Tools - NetBeans NetBeans IDE 6.5 (http://www.netbeans.org/)
  • 66. IDE Tools - JBuilder JBuilder 2008 (http://www.borland.com/)
  • 67. IDE Tools - JDeveloper Jdeveloper 11g (http://www.oracle.com/technology/products/jdev/index.html/)
  • 68. Etc Tools Code Warrior by Metrowerks : http://www.metrowerks.com TextPad Editor : http://www.textpad.com JEdit : http://www.jedit.org JGrasp : http://www.jgrasp.org BlueJ : http://www.bluej.org DrJava : http://drjava.sourceforge.net
  • 70. Java Programming Development Process (Cont.) 1. Create a source file 2. Compile the source file into a bytecode file 3. Run the program contained in the bytecode file
  • 71. Creating a Source Code – HelloWorld.java
  • 72. Compiling the Source Code – HelloWorld.java Java Compiler – javac.exe
  • 73. Interpreting the bytecode – HelloWorld.class Java Interpreter – java.exe
  • 74. Command Line Tools JDK provides several command-line tools. Commonly used tools is a compiler, launcher/interpreter, archiver, documenter. Refer to http://java.sun.com/javase/6/docs/technotes/tools
  • 75. Command Line Tools - Compiler Translates Java source files into Java bytecode. Creates a bytecode file with the same name as the source file but with the .class extension. javac [-options] [source files] javac HelloWorld.java javac –cp ./dir/classes/ HelloWorld.java javac –d ./opt/hwapp/classes HelloWorld.java javac –source 1.4 HelloWorld.java javac –version javac –help Refer to http://www.javaexpert.co.kr/entry/22 Refer to http://pllab.kw.ac.kr/j2seAPIs/tooldocs/windows/java.html
  • 76. Command Line Tools - Interpreter Handles the program execution, including launching the application. java [-options] class [arguments…] or java [-options] –jar jarfile [arguments…] java HelloWorld java –cp .:./dir/Classes HelloWorld java –ea HelloWorld java –version java –help javaw <classname> Refer to http://javaexpert.co.kr/entry/23 Refer to http://pllab.kw.ac.kr/j2seAPIs/tooldocs/windows/java.html
  • 77. Command Line Tools - Packager JAR, Java Archive, utility is an archiving and compression tool. Used to combine multiple files into a single file called a JAR file. JAR consists of a ZIP archive containing a manifest file (JAR content describer) and optional signature files (for security). jar [options] [jar-file] [manifest-files] [entry-point] [-C dir] files… jar cf files.jar HelloWorld.java kr/co/javaexpert/HelloWorld.class jar tfv files.jar jar xf files.jar Refer to http://javaexpert.co.kr/entry/24 Refer to http://pllab.kw.ac.kr/j2seAPIs/tooldocs/windows/jar.html
  • 78. Command Line Tools – JAR Execution Can be created to be executable. Specifies the file within the JAR where the ‘main’ class resides. Refer to http://javaexpert.co.kr/entry/25 1. Compile .java file with package option. 2. Create a file Manifest.txt using editor. 3. Create a JAR file that adds the Manifest.txt contents to the manifest file, MANIFEST.MF. 4. Display the contents of the JAR file. 5. Execute the JAR file using java –jar option.
  • 79. Figure 1.3. shows an examples of this basic communication. Applications: Text editor Browser Operating system Hardware
  • 80. Figure 1.4. Computer Communication Problem Applications: Text editor Browser Other apps Operating system Hardware
  • 81. How Java Technology Solves the Communication Problem Uses compiling and interpretation. A little slower than compiled programs, but runs on any operating system. Compiles source code to bytecode. Uses Java virtual machine (JVMTM), interprets bytecode. Uses a different JVM for every operating system.
  • 82. Figure 1.5. How the JVM Interacts With the Operating System and Java Applets Applets Java apps Applications: Text editor JVM Browser JVM Operating system Hardware
  • 83. Java API Documentation Detailed information API Very valuable resource: download,or view online at: http://java.sun.com/javase/6/docs/api/index.html
  • 84. Figure 1.6. Java 2 Platform Specification, java.lang Package, Boolean Class
  • 85. Additional Resource Java Technology : An Early History http://java.sun.com/features/1998/05/birthday.html Java Technology In The Real World http://java.sun.com/nav/used/index.html