java se: present and future - huihoodocs.huihoo.com/javaone/2007/java-se/ts-2383.pdfjava se present...

55
2007 JavaOne SM Conference | TS-2383 | TS-2383 Java SE: Present and Future Danny Coward Java SE Platform Lead Sun Microsystems, Inc. blogs.sun.com/dannycoward

Upload: vuongnga

Post on 11-Apr-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

2007 JavaOneSM Conference | TS-2383 |

TS-2383

Java™ SE: Present and Future

Danny Coward Java SE Platform LeadSun Microsystems, Inc.blogs.sun.com/dannycoward

2007 JavaOneSM Conference | TS-2383 | 2

What This Talk Is About

Everything you need to know about what’s going on in the Java™ Platform, Standard Edition (Java™ SE platform).

2007 JavaOneSM Conference | TS-2383 | 3

What This Talk Is AboutTS-2383

Java SE Present and Future

Tue 10.50am

Everything you need to know about what’s going on in the Java™ Platform, Standard Edition (Java™ SE platform)(and spotlight some great talks this week)

2007 JavaOneSM Conference | TS-2383 | 4

A Note on Navigation● Stay tuned if you’re reading this● It’s going to get

● Really exciting● Shortly

Subtitle often indicates which release I’m talking about

2007 JavaOneSM Conference | TS-2383 | 5

AgendaIt’s All About Java SE 6 PlatformThe Making of Java SE PlatformJava Platform Speaks in Many TonguesBreaking Up Is Hard to DoJava SE Platform on the DesktopSome Important Upgrades

2007 JavaOneSM Conference | TS-2383 | 6

AgendaIt’s All About Java SE 6 PlatformThe Making of Java SE PlatformJava Platform Speaks in Many TonguesBreaking Up Is Hard to DoJava SE Platform on the DesktopSome Important Upgrades

2007 JavaOneSM Conference | TS-2383 | 7

Java technology releasesChanging Face of Java

1995 1997 1999 2001 2003 2005 2007 2009

JDK 1.0

JDK 1.1

J2SE 1.2 “Playground”

J2SE 1.3 “Kestrel”

J2SE 1.4 “Merlin”

J2SE 5.0 “Tiger”

Java SE 6

Java SE 7

JDK = Java Development Kit (JDK™) | JRE = Java Runtime Environment (JRE™) | J2SE = Java 2 Platform, Standard Edition (J2SE™ platform)

2007 JavaOneSM Conference | TS-2383 | 8

Java technology releasesChanging Face of Java

James GoslingThe Toy Show

Fri 8.30am

1995 1997 1999 2001 2003 2005 2007 2009

JDK 1.0

JDK 1.1

J2SE 1.2 “Playground”

J2SE 1.3 “Kestrel”

J2SE 1.4 “Merlin”

J2SE 5.0 “Tiger”

Java SE 6

Java SE 7

JDK = Java Development Kit (JDK™) | JRE = Java Runtime Environment (JRE™) | J2SE = Java 2 Platform, Standard Edition (J2SE™ platform)

2007 JavaOneSM Conference | TS-2383 | 9

Year in Review

JDK = Java Development Kit (JDK™) | JRE = Java Runtime Environment (JRE™)

2006 2007 2008 2009

“It’s not a matter of when

but how”

First piecesOpen Sourced

OpenJDK™Launch

JDK 6Released

JRE 6Released

Java SE 7Released

2007 JavaOneSM Conference | TS-2383 | 10

Java SE 6J2SE 5.0J2SE 1.4.2J2SE 1.3.1

JDK Version 6 Adoption

Source: java.sun.com

2,090,155 downloads of the JDK Version 6. Already!

Downloads of the JDK release since December

2007 JavaOneSM Conference | TS-2383 | 11

1/2004 1/2005 1/2006 1/20070

5,000,000

10,000,000

15,000,000

20,000,000

25,000,000

30,000,000

35,000,000

40,000,000

45,000,000

50,000,000

55,000,000

Com

plet

ed M

onth

ly D

ownl

oads

JRE software for the Java SE 6 platform!

JRE Software Adoption

2007 JavaOneSM Conference | TS-2383 | 12

Java SE Platform on the Desktop● 60% of new PCs will have Java SE platform

pre-installed● 91% of all PCs run Java platform* ● That’s 540 million PCs worldwide● 35.5 million of them upgraded to the Java SE 6

platform in the last 20 days in April

Have you upgraded to the Java SE 6 platform yet?

java.sun.com data except *Omniture

2007 JavaOneSM Conference | TS-2383 | 13

Java SE 6 Platform: Top 10 Features

Web Services Easy to use Web Service APIs

Scripting Ability to mix JavaScript™technology with Java code

Database Updated JDBC APIs, all-Java database in JDK

More Desktop APIs

Monitoring and Management Attach on demand

Compiler Access APIs to control the compiler

Define your own annotations

Desktop Deployment Better Swing fidelity, tuned for Vista

Security Integration with native services

Faster more reliable and backwards compatible

Swingworker, JTable sorting andfiltering, GroupLayout and more

Pluggable Annotations

The Ilities: Quality, Compatibility, Stability

http://blogs.sun.com/dannycoward/entry/java_se_6_top_ten

JDBC = Java Database Connectivity (JDBC™)

Present

2007 JavaOneSM Conference | TS-2383 | 14

Java SE Platform TroubleshootingJava SE 6 platform

http://blogs.sun.com/dannycoward/entry/java_se_6_top_ten

Tool name PurposeGUI for diagnosticsDetermine Java technology processesSnapshot memory usage

Analyze memory usageThread status

jconsolejpsjmap

jhatjstack

BOF-2816 Troubleshooting

Tue 8pm

No need to restart the Java Virtual Machine any more!

2007 JavaOneSM Conference | TS-2383 | 15

J2SE 1.3.1 J2SE 1.4.2 J2SE 5.0 Java SE 6.00

255075

100125150175200225250

275300325350

Nor

mal

ized

to J

2SE

1.3.

1 Pe

rform

ance

AND Java SE 6 platform holds Single Instance SPECjbb2005 World Record, on Sun Fire™ E25K server with a score of 1,149,100 SPECjbb2005 bops/JVM

JVM = Java Virtual Machine (JVM™)The terms “Java Virtual Machine” and “JVM” mean a Virtual Machine for the Java™ platform.

Server benchmark: SPECjbb2000 TS-2885High-

performanceThur 4.10pm

Better Performing on the Server

2007 JavaOneSM Conference | TS-2383 | 16

Better Performing on the Desktop

J2SE 1.2.2 J2SE 1.3.1 J2SE 1.4.2 J2SE 5.0 Java SE 6.00

102030405060708090

100110120130140150

Nor

mal

ized

to J

2SE

1.2.

2 Pe

rform

ance

Client benchmark: SwingMarkBOF-2366

Performance Q’sWed 7.55pm

2007 JavaOneSM Conference | TS-2383 | 17

AgendaIt’s All About Java SE 6 PlatformThe Making of Java SE PlatformJava Platform Speaks in Many TonguesBreaking Up Is Hard to DoJava SE Platform on the DesktopSome Important Upgrades

2007 JavaOneSM Conference | TS-2383 | 18

Today!Java SE Platform Is Open Sourced● Fully buildable open source JDK software ● Extension of the Peabody experience● GPLv2 license, encouraging

● Compatible innovations● Wider distribution

● OpenJDK community● openjdk.java.net

● Interim governance board● Charter to build OpenJDK constitution

2007 JavaOneSM Conference | TS-2383 | 19

How Java SE Platform Gets DevelopedPresent and future

TS-2800OpenJDK Project

Tues. 6pm

What API Specifications JDK Implementation

Where jcp.org openjdk.java.net

How Expert Groups OpenJDK projects

When Now Now!

2007 JavaOneSM Conference | TS-2383 | 20

AgendaIt’s All About Java SE 6 PlatformThe Making of Java SE PlatformJava Platform Speaks in Many TonguesBreaking Up Is Hard to DoJava SE Platform on the DesktopSome Important Upgrades

2007 JavaOneSM Conference | TS-2383 | 21

“ Any customer can have a car painted any color that he wants so long as it is black.”

– Henry Ford

2007 JavaOneSM Conference | TS-2383 | 22

Why Go Multi-Lingual● Java programming language is the best

general purpose language!● Many other languages, many other virtues

● Rapid prototyping and experimentation● Particular styles of programming● Mixing different types of developers● Or just for fun

Present and future

2007 JavaOneSM Conference | TS-2383 | 23

Java SE Platform Supports Scripting● Scripting for the Java Platform (JSR 223)

● Developer APIs to mix script fragments in● Framework APIs for adding script engines

● Collecting conforming scripting engines● See scripting.java.net

● We added a JavaScript technology engine● JavaScript technology works out of the box

Java SE 6 platform

JSR = Java Specification Request

2007 JavaOneSM Conference | TS-2383 | 24

Scripting on Java SE 6 PlatformJava SE 6 platform

// create a ScriptEngineManagerScriptEngineManager m = new ScriptEngineManager();// get an instance of JavaScript script engineScriptEngine engine = m.getEngineByName("js");// evaluate few scripts that are bundled in "resources"eval(engine, " alert(\"Hello World!\") ");

Insert any other JavaScript programming language here

2007 JavaOneSM Conference | TS-2383 | 25

Scripting Sample in JDK Version 6Java SE 6 platform

2007 JavaOneSM Conference | TS-2383 | 26

Scripting on Java SE 6 PlatformJava SE 6 platform

2007 JavaOneSM Conference | TS-2383 | 27

Multiple Languages in JDK Version 7● Turbo-charging scripting engines

● New bytecode for dynamic method dispatch● ‘Supporting Dynamically Typed Languages

on the Java Platform’ (JSR 292)● Investigate hotswapping

● Bundling more dynamic language engines

● ‘The Beanshell Scripting Language’(JSR 274)

● JRuby, Jython, BeanShell, Groovy● JavaFX™ technology Script

Java SE 7 platform

TS-9574Jython and

JavaFri 12.10pm

TS-9370Ruby on RailsThur 9.35am

2007 JavaOneSM Conference | TS-2383 | 28

Evolving the Java Programming Language● Reading is more important than writing● One language same meaning; everywhere● Simplicity matters

● Seeking a small number of changes for Java SE 7 platform

TS-2707Java PuzzlersTue 3.20pm

Java SE 7 platformJava SE 7 platform

2007 JavaOneSM Conference | TS-2383 | 29

Evolving the Java Programming Language● ‘superpackages’● Extensions to the annotation syntax

(JSR 308)● Language support for Java technology properties● Control abstraction constructs

● Closures● Concise instance creation expressions● First-class methods

● Operator overloading● ‘Rough edges’

● Shorter variable declaration, strings in switch statements, Enum comparisons

BOF-2899Language ProposalsTue 10pm

TS-2294Closures

Tue 4.40pm

Java SE 7 platform—potential changes

2007 JavaOneSM Conference | TS-2383 | 30

AgendaIt’s All About Java SE 6 PlatformThe Making of Java SE PlatformJava Platform Speaks in Many TonguesBreaking Up Is Hard to DoJava SE Platform on the DesktopSome Important Upgrades

2007 JavaOneSM Conference | TS-2383 | 31

Java SE 6 platformModularity in Java SE Platform● Development time

● Interfaces and implementation classes● Information hiding

● public, private and protected, class level and below● Assertions

● Deployment time● Java ARchives (JAR)● Resources framework

2007 JavaOneSM Conference | TS-2383 | 32

Java SE 6 platform

Java Technology Packages Dilemma

A package

API access

Key

org.foo.ui

baa

org.foo.pics

org.foo.data

org.foo.txt

2007 JavaOneSM Conference | TS-2383 | 33

Java SE 7 platform

Dilemma Resolved by superpackage

org.foo.document 'superpackage'

org.foo.ui

org.foo.pics

org.foo.data

org.foo.txt

2007 JavaOneSM Conference | TS-2383 | 34

Draft Syntax for superpackages

super package org.foo.document {// super-package exports:export org.foo.pics.MyImageInterface;export org.foo.txt.*;// super-package members:org.foo.pics.MyImageInterface;org.foo.txt.*org.foo.data.*;

}

2007 JavaOneSM Conference | TS-2383 | 35

Java SE 6 platformPackaging Applications

● JAR file format is stretched to its limit● Hard to version● Difficult to manage● Can’t express dependencies

● Due for major upgrade in Java SE 7 platform● Java Application Modules (JAM)

Java ARchiveVersioning

DependenciesDistribution Packaging

Classloading

2007 JavaOneSM Conference | TS-2383 | 36

Anatomy of a JAM Fileorg.foo.document-1.2.3.jam:

/META-INF/ MANIFEST.MF/MODULE-INF/METADATA.module/MODULE-INF/bin/doc-windows.dll/MODULE-INF/bin/doc-linux.so/MODULE-INF/lib/helper.jar/org/foo/pics/MyImageInterface/org/foo/txt/Word.class/org/foo/txt/Sentence.class/org/foo/data/Letter.class/org/foo/data/Number.class/icon/graphics.jpg

Metadata—under /MODULE-INF directory

Native libraries—under /MODULE-INF/bin directory

Embedded JAR files—under /MODULE-INF/lib directory

Resources—e.g. classes, images, etc.

Java SE 7 platform

2007 JavaOneSM Conference | TS-2383 | 37

Java SE 7 platform

Summary: Modularity in Java SE Platform● Development time: superpackages

● JSR 294: Improved Modularity Support

● Deployment time: superJARs● JSR 277: Java Module System● Aiming for interoperability with

JSR 291: OSGi

● Both have open mailing lists● Project at

openjdk.java.net/projects/modules

TS-2401 Superpackages

Th. 9.35am

TS-2318Java Modules

Th. 4.10pm

BOF-21240 JSR 291 OSGi

Wed 9.55

2007 JavaOneSM Conference | TS-2383 | 38

AgendaIt’s All About Java SE 6 PlatformThe Making of Java SE PlatformJava Platform Speaks in Many TonguesBreaking Up Is Hard to DoJava SE Platform on the DesktopSome Important Upgrades

2007 JavaOneSM Conference | TS-2383 | 39

Swing Development● Swing is a powerful toolkit● Some developers are put off

● “Routine things should be easier”● “There’s too much choice”● “I end up writing too much code”● “It’s difficult to teach”

● Time to make it easier!

Java SE 6 platform

TS-3834 Productive Swing

Thur 9.35am

2007 JavaOneSM Conference | TS-2383 | 40

A Swing ApplicationApplication Controller

Application Framework

Web Service

Database

Java SE 7 platform

Data Synchronization

Data Conversion

Data Validation

Data Model

Resources

Actions

Lifecycle

Tasks

2007 JavaOneSM Conference | TS-2383 | 41

Resources

Actions

Lifecycle

Tasks

Easier Swing DevelopmentJava SE 7 platform

● JSR 295: Beans Binding● Formalizing the Swing Controller● API for connecting JavaBeans™

specifications● JSR 303: Bean Validation

● Metadata model to express validation constraints

● JSR 296: Swing Application Framework

● Formalizing supportfunctions

Application Controller

Data Synchronization

Data Conversion

Data Validation

TS-3569Bean BindingThur 4.10pm

TS-3290Swing App…Tue 3.20pm

2007 JavaOneSM Conference | TS-2383 | 42

Desktop Deployment● Startup time is poor

● Especially starting from cold● Installing is slow and complicated

● The JRE software has become very large

● Irritating for enterprise applications, worse for consumer applications

Java SE 6 platform

2007 JavaOneSM Conference | TS-2383 | 43

JRE Software Download SizePast and present

JRE Version0

1

2

3

4

5

6

7

8

9

10

11

12

Java 1.1Java 1.2Java 1.3Java 1.4Java 5.0Java 6.0

Size

in M

B

2007 JavaOneSM Conference | TS-2383 | 44

The Consumer JRE Release● Quickstarter

● Pre-load the cache, before launch● Not the same as having a running VM● Cooperates with the OS

● A radically improved install experience● A Modular JRE version

Late 2007/early 2008

2007 JavaOneSM Conference | TS-2383 | 45

‘Java Technology-Based Kernel’ : Modularizing the JRE Software● Just enough to run “Hello World”● Install the rest in background

● Referencing a class● Class.getResource() or equivalent● System.loadLibrary() or equivalent

● Custom JRE versions for applications thatcan’t pause

Consumer JRE Release

2007 JavaOneSM Conference | TS-2383 | 46

Promising Results

Hello World Notepad SwingSet2 LimeWire Entire JRE0

1

2

3

4

5

6

7

8

9

10

11

12

Size

in M

B

Consumer JRE Release

TS-3290Easy

DeploymentTue 4.40p

2007 JavaOneSM Conference | TS-2383 | 47

AgendaIt’s All About Java SE 6 PlatformThe Making of Java SE PlatformJava Platform Speaks in Many TonguesBreaking Up Is Hard to DoJava SE Platform on the DesktopSome Important Upgrades

2007 JavaOneSM Conference | TS-2383 | 48

Management Updates● JSR 255: Java Management Extensions (JMX™)

Specification, version 2.0● Namespaces, federated JMX technology servers● opendmk.dev.java.net

● JSR 262: Web Services Connector for JMX Agents

● Based on ws management standards● Early Draft Available● ws-jmx-connector.dev.java.net

Java SE 7 platform

TS-2656 JMX™

Thur 10.55am

2007 JavaOneSM Conference | TS-2383 | 49

More New IO APIs for Java SE Platform● JSR 203: In early draft● New file system API java.nio.filesystem.Filesystem

● Listen for filesystem changes● Security attributes (file permissions, ACLs,…)● Symbolic links● Adds operations: copy, move, walk file tree,…● Scalable access to directories

Java SE 7 platform

2007 JavaOneSM Conference | TS-2383 | 50

Summary Proposed JSRs for Java SE 7 Platform● JSR 277: Java Module System

● JSR 294: Improved modularity support in the Java programming language

● JSR 295: Beans binding

● JSR 303: Bean validation

● JSR 292: Supporting Dynamically Typed Languages

● JSR 296: Swing application framework

● JSR 203: More new I/O APIs for the Java Platform (NIO.2)

● JSR 220: Enterprise JavaBeans™ 3.0

● JSR 255: JMX specification, version 2.0

● JSR 262: Web services connector for JMX agents

● JSR 260: Javadoc™ Tag Technology Update

● JSR(s) TBD Java Language changes

● JSR 308: Annotations on Java Types

● JSR 310: Date and Time API

Subject change, based on Java Community ProcessSM (JCPSM), schedule

2007 JavaOneSM Conference | TS-2383 | 51

Proposed Technologies for Java SE 7 PlatformYou can look at most of these TODAY!

Specification Draft ? ImplementationJSR 277: Java Module System Early Draft openjdk.java.net/projects/modules

- openjdk.java.net/projects/modules

JSR 295: Beans Binding -

JSR 303: Bean Validation - -

JSR 296: Swing Application Framework -

JSR 203: NIO.2 Early Draft -

JSR 292: Supporting Dynamically Typed Languages - -

JSR 220: Enterprise JavaBeans 3.0 Final Spec

JSR 255: JMX Specification, version 2.0 - opendmk.dev.java.net

JSR 262: Web Services Connector for JMX Early Draft ws-jmx-connector.dev.java.net/

JSR 260: Javadoc Tag Technology Update - -

JSR(s) TBD Java Language changes -

JSR 308: Annotations on Java Types -

JSR 310: Date and Time API -

JSR 294: Improved Modularity Support in the Java Programming Language

beansbinding.dev.java.net

appframework.dev.java.net/

glassfish.dev.java.net

ksl.dev.java.net

pag.csail.mit.edu/jsr308/

jsr-310.dev.java.net/

2007 JavaOneSM Conference | TS-2383 | 52

Java SE platform present and futureSummary● Java SE 6 platform

● Use it now!● OpenJDK

● Join us in building it!● Java SE 7 platform

● Join us in defining it!

● Visit us at planetjdk.org

BOF-2384Meet the Java

SE ExpertsThur 7.55pm

2007 JavaOneSM Conference | TS-2383 | 53

Q&A

2007 JavaOneSM Conference | TS-2383 |

TS-2383

Java™ SE: Present and Future

Danny Coward Java SE Platform LeadSun Microsystems, Inc.blogs.sun.com/dannycoward

2007 JavaOneSM Conference | TS-2383 | 55

Competing Demands on Java SE Platform

CreatingJava SE Platform

Evangelizing andEducating Java

Technology

Porting Java SEPlatform

Distributing JavaRuntime Environments

Using JavaApplications

JavaDevelopers

JavaDeployers

Creating Development and Runtime Tools

Creating App, Web Server

and Java frameworks