Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 1
Taming the TigerThe Java™ 2 Platform, Standard Edition, Release 1.5
Mark ReinholdSenior Staff EngineerSun Microsystems, [email protected]
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 2
AgendaQuick update on 1.4 maintenance releases
1.4.1 “Hopper”1.4.2 “Mantis”
Overview of 1.5 “Tiger”Themes and focusMain features
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 3
J2SE Platform StatusJ2SE platform is widely adopted
Now long past the “early adopter” phase
Being used for mission critical appsOften with very demanding scalability needs
Supports big serversBoth web tier and transaction tier
Supports a wide variety of GUI appsFrom small applets to very large desktop apps
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 4
“Hopper” 1.4.1Main focus was on quality improvements
Over two thousand bug fixes
Limited Itanium supportLinux and WindowsFor developers only, no JIT
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 5
“Hopper” 1.4.1 (Continued)
New garbage collectorsConcurrent mark-and-sweep• Separate thread does GC work
Parallel young space collection• Exploits multiple CPUs
Deployment improvementsEspecially for internet applets (games, etc.)Reduced download size
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 6
“Mantis” 1.4.2Again, main focus is on quality
Another 2,700 bug fixes!
Full Itanium supportLinux and WindowsFully deployable, high-performance JIT
Lots of general performance workEspecially for Linux/x86Significantly improved startup time (15–30%)
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 7
“Mantis” 1.4.2 (Continued)
Two new Swing look-&-feelsWindows XP and Linux GTK
Deployment improvementsNew windows installerReduced download size
The return of the ActiveX bridge
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 8
“Mantis” 1.4.2: DeferredAuto-update for JRE
Targeted at internet consumersChecks for updates periodicallyHelps users download and install updates
Was targeted for 1.4.2Needs more test exposureWill deliver in a 1.4.2_xx update
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 9
Windows XP Look & Feel
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 10
Swing Performance Trends
1.3.1 1.4.0 1.4.1 1.4.20
102030405060708090
100110120130140150160
SwingMark (bigger is better)
SolarisWindowsLinux
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 11
Timeline
20032002 2004
“ Merlin”1.4
“ Tiger”1.5
“ Hopper”1.4.1
“ Mantis”1.4.2
“ Mustang”1.6
?????
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 12
“Tiger” 1.5Next major J2SE releaseTargeted at summer of 2004Tiger is BIG and FIERCE!
15 component JSRs for major new featuresMany, many upgrades to existing featuresLots of bug fixing and performance work
Specification being developed in the JCPUmbrella JSR 176
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 13
Tiger Expert GroupApacheAppleBorlandCisco SystemsFujitsu LimitedHewlett PackardIBM
MacromediaNokiaOracleSAP AGSAS InstituteSavaJeOsvaldo DoederleinJuergen Kreileder
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 14
Tiger Component JSRs003 JMX Management API013 Decimal Arithmetic014 Generic Types028 SASL114 JDBC Rowsets133 New Memory Model163 Profiling API166 Concurrency Utilities
174 Monitoring & Mgmt175 Metadata199 Compiler API200 Pack transfer format201 Minor language updates204 Unicode surrogates206 JAXP 1.3
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 15
Tiger Balances Many CriteriaBig focus: Quality, stability, compatibility
Customers need rock-solid releases
Support a wide range of application styles“From desktop to data center”
Big emphasis on scalabilityExploit big heaps, big I/O, big everything
Continue to deliver great new featuresBut in an evolutionary way
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 16
Tiger ThemesQuality
Compatibility, compatibility, compatibility!
Monitoring and ManageabilityPerformance and ScalabilityCore XML PlatformEase of DevelopmentDesktop Client
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 17
Quality, Stability, CompatibilityThis talk focuses on new features
Because they are easy to talk aboutBut they're really just the icing on the cake
J2SE team is heavily focused on qualityLots and lots of people working away on bugsWe know compatibility is key to customersWe know reliability and stability are criticalWe are making big SQE/SQA investments
Don't let the feature list distract you from this!
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 18
Monitoring & ManageabilityKey component of J2SE RAS strategy (Reliability, Availability, Serviceability)JVM Monitoring & Management (JSR 174)
Low memory detectionAllows access to internal VM statusHeap sizes, GC info, threads, etc.Industry standard, SNMP based
• Plugs into existing management consoles
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 19
Monitoring & Manageability (Continued)
JMX Management API (JSR 003)Support for remote managementWorks with existing J2EE application servers
New JVM profiling API (JSR 163)Allows improved performance analysis
Improved diagnostic facilitiesStack trace API, VM error handling
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 20
Performance & ScalabilityEven more support for big heaps
Improved concurrent/parallel collection
Yet more HotSpot tuningWe want those bytecodes to fly!
JVM memory sharing to reduce footprintFaster startup time
Especially important for desktop apps
Performance ergonomicsLess reliance on command-line flags
More support for adaptive self-tuning
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 21
Core XML PlatformTiger will support latest XML standards
XML 1.1 and XML NamespaceXML SchemaXSLTSAX 2.0.1DOM level 3
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 22
Web Services Developer PackCore Web Services platform
JAX-RPC & SAAJ (WSDL/SOAP)• Core infrastructure for Web Services
JAXB• Easy binding of XML data to Java objects
XML Security• Encryption and digital signature
JAXR• API for XML registries
Not part of Tiger
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 23
JDBC RowSetsCachedRowSet
Contains in-memory collection of rowsAllows disconnected use of dataUpdates can be resynchronized into database
WebRowSetUses XML for data transfer
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 24
Ease of Development
MetadataKey new Java language ideaDecoration of classes/methods/fields
public @Fred @Bert(3) int x;
Supports declarative programmingIt is a new way of thinkingWill be used to simplify J2EE APIs
By defining standard decorationsand tools to process them
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 25
Ease of Development
Metadata Example: JAX-RPC
public interface PingIF extends Remote {public void ping() throws RemoteException;
}
public class Ping implements PingIF {public void ping() { ... }
}
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 26
Ease of Development
Metadata Example: JAX-RPCpublic interface PingIF extends Remote {
public void ping() throws RemoteException;}
public class Ping implements PingIF {public void ping() { ... }
}
public class Ping {public @remote void ping() { ... }
}
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 27
Ease of Development
Generic Types
// This HashMap maps Strings to MammalsHashMap m
= new HashMap();m.put("wombat", new Mammal());Mammal w = (Mammal)m.get("wombat");
m.put("gecko", new Lizard());Mammal x = (Mammal)m.get("gecko");
Runtime error: ClassCastException
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 28
Ease of Development
Generic Types (Continued)
// This HashMap maps Strings to MammalsHashMap<String,Mammal> m
= new HashMap<String,Mammal>();m.put("wombat", new Mammal());Mammal w = m.get("wombat"); // No (Mammal)!
m.put("gecko", new Lizard());Compile-time error: Type mismatch
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 29
Ease of Development
Other Tiger Language Features
Iterating over collections
for (Iterator<String> i = c.iterator(); i.hasNext();)
{String s = i.next();
...}
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 30
Ease of Development
Other Tiger Language Features
Iterating over collections
for (Iterator<String> i = c.iterator();i.hasNext();)
{String s = i.next();...
}for (String s : c) { ... }
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 31
Ease of Development
Other Tiger Language FeaturesIterating over collections
for (String s : c) { ... }
Enumerated typespublic class Toss { • private String name; • private Toss(String n) { name = n; }• public toString() { return name; } • public Toss HEADS = new Toss("HEADS"); • public Toss TAILS = new Toss("TAILS"); • ...
}
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 32
Ease of Development
Other Tiger Language FeaturesIterating over collections
for (String s : c) { ... }
Enumerated typespublic class Toss { • private String name; • private Toss(String n) { name = n; }• public toString() { return name; } • public Toss HEADS = new Toss("HEADS"); • public Toss TAILS = new Toss("TAILS"); • ...
}
public enum Toss { HEADS, TAILS }
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 33
Ease of Development
Other Tiger Language FeaturesIterating over collections
for (String s : c) { ... }
Enumerated typespublic enum Toss { HEADS, TAILS }
Autoboxing of primitive typesInteger x = new Integer(3); • int y = x.intValue(); • map.put(new Integer(1),
new Integer(42));
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 34
Ease of Development
Other Tiger Language FeaturesIterating over collections
for (String s : c) { ... }
Enumerated typespublic enum Toss { HEADS, TAILS }
Autoboxing of primitive typesInteger x = new Integer(3); Integer x = 3;int y = x.intValue(); int y = x;map.put(new Integer(1), map.put(1, 42);
new Integer(42));
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 35
Ease of Development
Simple Formatting & Scanningprintf/scanf popular in C/Perl/etc.
Powerful, easy to use
Adding similar features to J2SE 1.5out.format("%-12s is %2d long", name, l);out.format("value = %6.3f", value);
out.format("What is your favorite number? ");int n = in.nextInt();
Fully type-safe at run-time
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 36
Desktop ClientAdditional accessibility supportContinue to improve deployment
Upgrades to Java Plug-in and Java WebStartContinued quality & performance work
Startup and footprint workDirect support for OpenGL
Improved GUI look-and-feel supportGnome skins supportBetter Windows look and feelRevised Java look and feel
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 37
Unicode Supplementary CharsUnicode 3.1 adds more characters
Some characters don't fit in 16 bitsYikes!
Java char will stay at 16 bitsExtended chars will be pair of values
Encoded in strings
Library APIs will support these charsAs pairs within strings
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 38
MiscellanyConcurrency Utility Library (JSR 166)
Thread pools, semaphores, ...Being led by Doug Lea
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 39
The Java™ 2 Platform, Standard Edition, Release 1.5Taming the Tiger
And lots more...There's way too much for any one talk!
Colorado Software Summit: October 26 – 31, 2003 © Copyright 2003, Sun Microsystems, Inc.
Mark Reinhold — Taming the Tiger: The Java™ 2 Platform, Standard Edition, Release 1.5 Page 40
The Java™ 2 Platform, Standard Edition, Release 1.5Taming the Tiger
Call to actionCheck out the JCP reviews still in progress
http://jcp.org/jsr/detail/176.jsp
Download the beta release when it shipshttp://java.sun.com/j2se/1.5Does your old stuff work okay?Do the new APIs meet your needs?
Tell us what you think!http://java.sun.com/cgi-bin/bugreport.cgihttp://java.sun.com/mail/[email protected]