Presentation is loading. Please wait.

Presentation is loading. Please wait.

Java PAL.  Contains the development kit and the runtime environment ( aka the Java Virtual Machine )  Download Link:

Similar presentations


Presentation on theme: "Java PAL.  Contains the development kit and the runtime environment ( aka the Java Virtual Machine )  Download Link:"— Presentation transcript:

1 Java PAL

2  Contains the development kit and the runtime environment ( aka the Java Virtual Machine )  Download Link: http://java.sun.com/javase/downloads/index.jsp http://java.sun.com/javase/downloads/index.jsp  Installation ◦ Detailed instructions in the “Read This Before You Begin” section. ◦ Environment Variables  Path  Classpath

3  Originally was to be called “Oak”  Open Source Software ( free!! )

4  Mainframes, minicomputers, servers, desktops, notebooks, mobile devices, intelligent consumer devices  Windows, Linux, Unix, Macintosh, etc.

5  Application Programming Interface  Class Library  Packages ◦ Classes  Methods  Statements  http://java.sun.com/javase/6/docs/api/ http://java.sun.com/javase/6/docs/api/

6  Application ◦ A stand-alone program that runs on a computer.  Applet ◦ An applet is a Java program that is executed and viewed in a browser ( IE, Firefox, Navigator, etc. )  Servlet ◦ A servlet is a Java program that runs on a Web server or application server and provides server-side processing such as accessing a database and e-commerce transactions.

7 ◦ An object represents something in the real world, such as a car, an employee, or an item in an inventory. ◦ Objects encapsulate attributes and behavior  An attribute is a piece of information  A behavior is an operation that may be used to manipulate the value of an attribute

8  Reusable software components that model real-world items  Look all around you  People, animals, plants, cars, etc.  Attributes  Size, shape, color, weight, etc.  Behaviors  Babies cry, crawl, sleep, etc.  Even though Java is an object-oriented programming language, we will be doing procedural programming using the language. In the CIS 182/282 courses you will explore object-oriented programming in Java.

9  Java programs go through five phases: ◦ Edit  Programmer writes program using an editor; stores program on disk with the.java file name extension ◦ Compile  Use javac (the Java compiler) to create bytecodes from source code program; bytecodes stored in.class files ◦ Load  Class loader reads bytecodes from.class files into memory ◦ Verify  Bytecode verifier examines bytecodes to ensure that they are valid and do not violate security restrictions ◦ Execute  Java Virtual Machine (JVM) uses a combination of interpretation and just-in-time compilation to translate bytecodes into machine language

10

11  Classes are the fundamental unit of programming in Java.  Classes may be composed of: ◦ variablescorresponds to attributes ◦ methodscorresponds to behaviours

12 public class HelloWorld { public static void main(String args[]) { System.out.println(“Hello World!”); }  class is: HelloWorld  method is: main  header: public static void main(String args[])

13  A translator translates a program (class) in one language into another (often a machine language).  A translator may be a: ◦ compilertranslate only ◦ interpretertranslate and execute  Java uses both a compiler and an interpreter ( as do applications in the Visual Studio environment )

14  If you successfully compile a Java class, you produce a class file. This is a file with the same name as the program but with a.class extension  A Class file contains an intermediate language or virtual machine language. In Java this intermediate language is called bytecode.


Download ppt "Java PAL.  Contains the development kit and the runtime environment ( aka the Java Virtual Machine )  Download Link:"

Similar presentations


Ads by Google