Java Introduction
Java Introduction
Java Introduction
Web
programming
Introduction to Java
Agenda
Introduction to Java
www.corewebprogramming.com
Introduction to Java
www.corewebprogramming.com
Introduction to Java
www.corewebprogramming.com
www.corewebprogramming.com
Introduction to Java
Java Bytecode
Java Bytecode
JIT Compiler
or Interpreter
Execution
Introduction to Java
www.corewebprogramming.com
StarOffice 5.2
Introduction to Java
Java is Simple
Java has automatic memory management
No dangling pointers
No memory leaks
Introduction to Java
www.corewebprogramming.com
Introduction to Java
www.corewebprogramming.com
10
Introduction to Java
www.corewebprogramming.com
Introduction to Java
www.corewebprogramming.com
Java Versions
Java 1.0 released in 1995
Java 1.1 released in early 1997
12
Introduction to Java
www.corewebprogramming.com
13
Introduction to Java
www.corewebprogramming.com
14
XML Processing
Logging API
Assertions
Next generation I/0 library (java.nio)
SSL
JAAS authentication and authorization API
Introduction to Java
www.corewebprogramming.com
15
Introduction to Java
www.corewebprogramming.com
Applications
For standard applications use JDK 1.4 (known as Java 2
SDK, Standard Edition, Version 1.4)
Best Approach
Use JDK 1.4, but bookmark the JDK 1.1 API to check
available methods when writing applets
16
Introduction to Java
www.corewebprogramming.com
http://java.sun.com/j2se/1.4/
JDK 1.1
http://home.netscape.com/download/
http://www.microsoft.com/ie/download/
Suns HotJava
17
http://java.sun.com/products/hotjava/
Introduction to Java
www.corewebprogramming.com
18
Introduction to Java
www.corewebprogramming.com
19
Introduction to Java
20
Introduction to Java
www.corewebprogramming.com
10
File HelloWorld.java:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, world.");
}
}
21
Introduction to Java
www.corewebprogramming.com
Running:
java HelloWorld
Output:
Hello, world.
22
Introduction to Java
www.corewebprogramming.com
11
File ShowArgs.java:
public class ShowArgs {
public static void main(String[] args) {
for(int i=0; i<args.length; i++) {
System.out.println("Arg " + i + " is " +
args[i]);
}
}
}
23
www.corewebprogramming.com
Introduction to Java
24
0
1
2
3
is
is
is
is
Introduction to Java
fee
fie
foe
fum
www.corewebprogramming.com
12
Introduction to Java
www.corewebprogramming.com
26
</BODY>
</HTML>
Introduction to Java
www.corewebprogramming.com
13
Running:
Load HelloWWW.html in a Java-enabled browser
27
Introduction to Java
www.corewebprogramming.com
Introduction to Java
www.corewebprogramming.com
14
29
30
Introduction to Java
www.corewebprogramming.com
15
Summary
Java is a complete language, supporting
both standalone applications and Web
development
Java is complied to bytecode and can be
run on any platform that supports a Java
Virtual Machine
Java 2 Platform is bundled as a Standard
Edition and Enterprise Edition
Most browsers support only JDK 1.1
Install Java Plug-In for later versions of Java
31
www.corewebprogramming.com
Introduction to Java
core
Web
programming
Questions?
32
16