Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
Chris Eisoldt
Java Systems EngineerSecurity Technologies Ambassador
Developer Support Center
Java – Quo Vadis ?
java.sun.com
Agenda
● Java One News
● J2ME & Java Card
● J2SE & Core Java
● J2EE & Webservices
● Conclusion
Agenda
● Java One News
● J2ME & Java Card
● J2SE & Core Java
● J2EE & Webservices
● Conclusion
Sun Microsystems
Wal-Mart
Exxon Mobil
General Motors
BP
Ford Motor
DaimlerChryslerGeneral Electric
Toyota MotorCitigroup Oracle
ChevronTexaco
Nippon Telegraph & Telephone
Verizon
Deutsche Bank Microsoft
SonyAT&T
Honda Motor
Boeing
Motorola
Vodafone
Home Depot
Bank of America
J.P. Morgan Chase
Merck
Target
UPS
Albertson’s
Walt Disney
Java is in 100% of the Fortune 500
550MDesktops Run Java
Electronic Arts says:
17.6M visitors spend 8.2B minutes playing
Java games
(70 min/user/day)
You Want Volume?
1995 1997 1999 2001 2003
1B1.2B
0
J2EEJ2SEJ2ME
JavaCard
500Java User Groups
Worldwide
Java Developers Are
Everywhere
Apache Software Foundation
Fujitsu Limited
Motorola Oracle
Apple ComputerBank of AmericaBEA Systems
Boeing
Borland
Caldera Systems
Cisco Systems
Compaq
EDS
Ericsson
Hewlett-Packard
IBM Intel
IONA Technologies PLC
MacromediaMatsushita
Nokia Corporation
PalmSource
Philips
Siemens
SAP
Sony
Sun Microsystems
Texas Instruments
661JCP Members
Java Compatibility
Matters
Fujitsu
IONA
Borland
IBM
BEA
ATG
Hitachi
Macromedia
Novell
NEC
Oracle
Pramati
SAP
Trifork
Sun Microsystems
SAS
Sybase
SeeBeyond
SprintSoft
Tmax SoftAplix Corporation
JAMDAT Mobile
Motorola
NTT DoCoMo
NokiaOrange PCS
Panasonic
Research In Motion
Samsung Electronics Corporation
Siemens
Sony Ericsson Mobile Communications
Sprint
Symbian
T-Mobile International
Telefonica Moviles Espana
Vodafone
Java SecurityMatters
Java Compatibility+ Java Security= Java Mobility
Java PoweredAdvertising Campaign
Get Java!
Java.com
Project Rave● Project Rave– Productivity & simplicity
– Drag & Drop layout of user interfaces and component infrastructures
– plus 100% Java
● Availability– Early Access Fall 2003
● To Learn More– http://www.sun.com/software/projectrave
What’s Nextfor Java?
Agenda
● Java One News
● J2ME & Java Card
● J2SE & Core Java
● J2EE & Webservices
● Conclusion
Mobility
21 devices
J2ME Devices
i85s
A009
A 008
I50sxi55rxi80s i95clA388 T720
T280i
A820
V60i V66i
i90c
388c A835 E380I58sr
T725V600 V67TP226
9290
76507210 3410 6310i
5100
3585 3590 6610
7250 610
0
6800
3510i 3650 9210 9210i
8910i
6650
N-Gage
SL45i SL42M50 M46
C55CT56 MT50
S56 S55
I300SCHX250
SCHX350 Rainbow
SCH460
N400 I330
Nexio
S300
SCH-X110SCHX120
SCHX140
SCHX570 SCH
X600SCHX700
SCHX130
SCHX230 SCH
S100SPH
S4209 SO503iClie
P800A3014S SO504i T62U
CX-300L
iBookCnain2000 Ez-X1
5350 Cnain2100 CX300L
G8000 SD1100
SD2100Info
Comm VX1
U10
I90c SE
5100
More J2ME Devices
C452CA Cassiopeia
A3012CA
iPaq
F503is F503i F504i C451HC3001H SH-P300 QCP 6035C3002K
D503i D05 FOMAD2101v D06 Trium
EclipseN503i N503is FOMA
N2002N05 FOMA
N2051N504i N504i
J-K51
P503i P503isFOMA P2101vC3003P J-P51
GD87 P2002
C3011SAJ-SA51
A3011SAA3015SASCP-4900
SH07
Zaurus
SH08SH51 SH09SH5
2
2101V GX10
T06 A3013T C5001TT07
Blackberry5810
Treo 280 i705
Blackberry6510
Blackberry6710
Java Micro Edition
Functionality
June 2003 Spring 2004
JTWI 1.0
JTWI 2.0
CLDC 1.0/1.1
MIDP 1.0/2.0
MMAPI 1.0
WMA 1.0/1.1
Today
JSR 172Web Services
JSR 177J2ME-Java Card
JSR 179Location
Other JSRs
JSR 1843D Graphics
Mandatory APIsWMA 1.1MIDP 2.0CLDC 1.0
Conditional APIsMMAPI 1.1
CLDC 1.1
MandatoryAPIs
ConditionalAPIs
Other J2MEOptional Packages
Other J2METM
Optional Packages
J2METM Virtual Machines
Target System
Mobile phoneCLDC (KVM)Entry-level PDA
Smart card readers -
Game consoleWeb tabletTelematics system
TV set top box -
Desktop workstation -
32-bit ARM processor
Other 16-bit or 32-bit processors
CLDC HotSpotTM
Implementation
High-end PDA & Communicator
CDC HotSpotTM
ImplementationCDC or
PersonalJavaTM
CDCor CLDCJ2SETM
J F M A M J J A S O
CLDC HotSpotTM
J2METM Wireless Toolkit 2.0
Multimedia (JSR 135)
SMS (JSR 120)
User interface (JSR 37, JSR118)
Floating Point (JSR 139)
Web Services (JSR 172)
SIM card access (JSR 177)
Location Based Services (JSR 179)
Already Released
3D Graphics (JSR 184)
Session Invocation Protocol (JSR 180)
Java wireless client platform (JSR 185)
Event Tracking (JSR 190)
Telemetry (JSR 195)
J2METM Wireless Roadmap
Provisioning (JSR 124)
MMS (JSR 205)
K Virtual Machine (JSR 30)
JSR 172: XML Parsing Support
// setup Parser FactorySAXParserFactory spf = SAXParserFactory.newInstance();spf.setValidating(false);
// create the parser instance...SAXParser parser = spf.newSAXParser();
// setup XML input source and parsing event handlerjava.io.InputStream is = getXMLSource();org.xml.sax.helpers.DefaultHandler handler = getDocumentHandler();
// start parsing...parser.parse(is, handler);
JAXP Code Example
Code is identical to that used on J2SE
Web Services Optional Package
● API identical to JAX-RPC 1.0
● Simple and clean
– Hides connection handling, parameter marshalling/un-marshalling, session management
Code Example
// create stub instanceEmployeeDB_Stub stub = new EmployeeDB_Stub();
// set up the stubstub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, serviceURL);stub._setProperty(Stub.SESSION_MAINTAIN_PROPERTY, Boolean.TRUE);
// invoke the remote method 'promoteEmployee'boolean success = stub.promoteEmployee(empName);
Agenda
● Java One News
● J2ME & Java Card
● J2SE & Core Java
● J2EE & Webservices
● Conclusion
72M Java Downloads of the Desktop SDK Since 1999
1999 2000 2001 20020
5
10
15
20
25
4.2
8
19.9
24J2SE SDK
Mill
ions
New
Java Standard Edition
● J2SE –● Web Start (30% faster)● Desktop Integration● Swing look-and-feels– Windows XP– Linux GTK+– Mac OS Aqua– Synth
java.sun.com/j2se/1.4.2
- bug fixes (1.4.1 + 1.4.2)
New
Coming
J2SETM Release Timeline
20032002 2004
“Merlin”1.4
“Tiger”1.5
“Hopper”1.4.1
“Mantis”1.4.2
“Mustang”1.6
“Dragonfly”1.5.1
2005
Hopper & Mantis● 1.4.1 “Hopper”– September 2002
– 2000+ bug fixes
– new parallel & concurrent garbage collectors
– JavaTM plug-in updates (consumer focused)
● 1.4.2 “Mantis”– June 2003
– another 2000+ bug fixes
– new look and feels: Windows XP, GTK+
– startup time and other performance work
1.5 “Tiger”
● Major J2SETM platform update– key Java language updates
● Big Themes:– Quality, Stability, Compatibility!
– Ease of Development
– Monitoring and Manageability
– Performance and Scalability
– Desktop Client
Ease of Development
● Major Theme for J2SE 1.5 (Tiger) & J2EE 1.5
● Language features: Metadata, Generics, Enum, Collections, ..., + API work
● Simple declarations & usage
● Keep the power – enable the tools – up simplicity – Grow Developers
● Project RAVE
Forthcoming Language Features
● JSR-014 Generics
● JSR-175 Metadata
● JSR-201 Remaining language changes– Enhanced “foreach”-style Loops
– Autoboxing/Unboxing
– Typesafe Enums
– Static Imports
– Varargs
For more information: http://www.jcp.org
Generics
● Today: casts, extra parentheses & temporary variables
Compile time type safety – no need to cast!
static void expurgate(Collection c) { for (Iterator i = c.iterator(); i.hasNext(); ) { String s = (String) i.next(); if(s.length() == 4) i.remove(); }}
● Using Generics: clearer and safer
static void expurgate(Collection<String> c) { for (Iterator<String> i = c.iterator(); i.hasNext(); ) if (i.next().length() == 4) i.remove();}
Enhanced for Loop (“foreach”)
● Today: using iterators is error-prone
Easy iterating over collections
void cancelAll(Collection c) { for (Iterator i = c.iterator(); i.hasNext(); ) { TimerTask tt = (TimerTask) i.next(); tt.cancel(); }}
● Using Enhanced for: clearer and safer
void cancelAll(Collection c) { for (Object o : c) ((TimerTask)o).cancel();}
Autoboxing/Unboxing
● Today: ...the pain of converting...
Putting primitives into a collection
public class Freq { private static final Integer ONE = new Integer(1);
public static void main(String[] args) { // Maps word (String) to frequency (Integer) Map m = new TreeMap();
for (int i=0; i<args.length; i++) { Integer freq = (Integer) m.get(args[i]); m.put(args[i], (freq==null ? ONE : new Integer(freq.intValue() + 1))); } System.out.println(m); }}
Autoboxing/Unboxing
● Using generics, foreach and autoboxing:
Putting primitives into a collection
public class Freq { public static void main(String[] args) { Map<String, Integer> m = new TreeMap<String, Integer>(); for (String word : args) m.put(word, Collections.getWithDefault(m, word) + 1); System.out.println(m); }}
Metadata
● Today: paired interface and implementation is required
Example: Simple JAX-RPC Webservice
public interface CoffeeOrderIF extends java.rmi.Remote { public Coffee [] getPriceList() throws java.rmi.RemoteException; public String orderCoffee(String name, int quantity) throws java.rmi.RemoteException; }
public class CoffeeOrderImpl implements CoffeeOrderIF { public Coffee [] getPriceList() { ... } public String orderCoffee(String name, int quantity) { ... }}
Metadata
● Using Metadata: tools can generate text, programmer writes a short annotation
Example: Simple JAX-RPC Webservice
import javax.xml.rpc.*;
public class CoffeeOrder { @Remote public Coffee [] getPriceList() { ... } @Remote public String orderCoffee(String name, int quantity) { ... }}
Huge Performance Gains
● Parallel GC
● Mark Sweep GC
● SSE/SSE2 Support for Intel processors (1.4.2)
● Startup times reduced – for example, Swing 30% reduction
● Swing GUI performance up 50%
● Tuning all over the place!
Continuous Performance Improvement
J2SE 1.2.2 J2SE 1.3.1 J2SE 1.4.2100%
120%
140%
160%
180%
200%
220%
240%
260%
280%
300%
320%
340%
SPECjbb2000 Throughput
1.4.2 Server-side Improvements on x86
Tests run on 4 cpu Pentium 4 @1.6Ghz
SPECjbb2000 Scientific MT Messaging0%
10%20%30%40%50%60%70%80%90%
100%110%120%130%140%150%160%170%180%190%200%
J2SE 1.4.1 Windows
J2SE 1.4.2 Windows
J2SE 1.4.1 Linux
J2SE 1.4.2 Linux
Perf
orm
ance
Nor
mal
ized
to
1.4.
1 W
indo
ws
J2EE Performance Improvements
SPECjAppServer2001 BOPS scores
Dual Node Multiple Node0%
50%
100%
150%
200%
250%
300%
350%
400%
450%
500%
550%
600%
650%
700%
750%
800%
850%
900%
1st Submission
Record
Agenda
● Java One News
● J2ME & Java Card
● J2SE & Core Java
● J2EE & Webservices
● Conclusion
J2EE is Growing More Than 100%
1999 2000 2001 20020
0.5
1
1.5
2
2.5
3
0.0298
0.48
1.3
2.89J2EE SDK
Mill
ions
Java Server Pages 2.0● Designed to make JSP programming
easier
● Expression Languages
– Expressions using JSPs:● <% ((Class) pageContext.get(“MyBean”)).do() %>
– Using Expression Language● ${MyBean.do}
● XML Syntax
● Custom Actions
J2EE 1.4 – EJB 2.1
● EJB™ 2.1 architecture– Web Services
– Timer Service
● Enhancements to:– Message-driven Beans
– EJB™ QL technology
EJB 2.1Integration von Web Services
● JSR-109 defidefines JAX-RPC mapping for stateless session beans as web service endpoints– SOAP stubs are created
at deploy time
– New interface
– Follows JAX RPCsyntax
Agenda
● Java One News
● J2ME & Java Card
● J2SE & Core Java
● J2EE & Webservices
● Conclusion
Duke's Choice Awards
Presented to: MARS ROVER
JAVA ROCKETSCIENCE AWARD
PEACE!