JDK Slides - Andrew.cmu.edu

Download Report

Transcript JDK Slides - Andrew.cmu.edu

Introduction to the JDK
Java for Computational Finance
46-935
JDK 1.1.7
• Our choice of development environment
– A product of Sun Microsystems (the creators of
Java)
– Most popular environment and most up to date
– Widely available (free from www.javasoft.com)
– Widely tested
– Simple to Use
JDK 1.1.7
• Simplicity has its price
– Functional environment, but not many bells and
whistles
– Command line interface
– Less than adequate debugging tools
JDK 1.1.7
• What you get with the JDK?
–
–
–
–
Java Virtual Machine Implementation
Java Core API
Documentation
Development Tools
JDK 1.1.7
• Virtual Machine Implementation
– Abstract computing machine and execution
environment for Java byte-code
– Java bytecode runs on the virtual machine, and
thus runs on any platform with an
implementation of the VM
– The code is independent of the platform
underlying the VM!
JDK 1.1.7
• Java Core API
– Essentially the raw materials from which you
will build programs
– Collections of classes organized in packages
•
•
•
•
•
java.lang
(Object, Integer, String ….)
java.util
(Vector, Hashtable, Date….)
java.awt
(Window, Menu, Button….)
java.net
(Socket, URL, DatagramPacket….)
and more ….
JDK 1.1.7
• Documentation
–
–
–
–
HTML documentation on the Core API
Organized by Package
Documents fields and methods of each class
Was created automatically via javadoc (as we’ll
see later)
JDK 1.1.7
• Tools
– A wide array of tools for aiding development
– Most importantly:
• javac
• java
• javadoc
JDK 1.1.7
• Tools
– javac
• The Java Language Compiler that you use to
compile programs written in the Java Programming
language into platform-independent bytecode
• javac MyProgram.java
JDK 1.1.7
• Tools
– java
• The Java Interpreter that you use to run programs
written in the Java Programming Language.
• java MyProgram
JDK 1.1.7
• Tools
– javadoc
• Generates API documentation in HTML format
from Java source code.
• Requires some work on your part (a commenting
format must be followed)
• javadoc MyProgram.java
JDK 1.1.7
• For further information….
http://www.javasoft.com/products/jdk/1.1/docs/