SlideShare ist ein Scribd-Unternehmen logo
1 von 56
Downloaden Sie, um offline zu lesen
Java 7
NormandyJUG
Alexis Moussine-Pouchkine
Oracle
The following is intended to outline our general
product direction. It is intended for information
purposes only, and may not be incorporated into
any contract. It is not a commitment to deliver any
material, code, or functionality, and should not be
relied upon in making purchasing decisions.

The development, release, and timing of any
features or functionality described for Oracle’s
products remains at the sole discretion of Oracle.



                                                      2
Priorities for the Java Platforms

                 Grow Developer Base

                 Grow Adoption

                 Increase Competitiveness


                Adapt to change
A long long time ago...
1.0
 •    1996
 •    WORA
 • Bouncing
Duke
1.0                       1.2                           1.4
 •    1996                 •    1998                     •    2002
 •    WORA                 •    Collections              •    JCP
 • Bouncing                •    Swing                    •    XML
Duke




              1.1                      1.3
               •    1997                •     2000
               •    JDBC                •     Hotspot
               •    JavaBeans
1.0                       1.2                           1.4                         6
 •    1996                 •    1998                     •    2002                      •   2006
 •    WORA                 •    Collections              •    JCP                       •   Perf.
 • Bouncing                •    Swing                    •    XML                       •   JConsole
Duke




              1.1                      1.3                           5.0
               •    1997                •     2000                    •    2004
               •    JDBC                •     Hotspot                 •    Generics
               •    JavaBeans                                         •    Annotations
Evolving the Language
From “Evolving the Java Language” - JavaOne 2005
•   Java language principles
    –   Reading is more important than writing
    –   Code should be a joy to read
    –   The language should not hide what is happening
    –   Code should do what it seems to do
    –   Simplicity matters
    –   Every “good” feature adds more “bad” weight
    –   Sometimes it is best to leave things out
•   One language: with the same meaning everywhere
    • No dialects
•   We will evolve the Java language
    • But cautiously, with a long term view
    • “first do no harm”
                                    also “Growing a Language” - Guy Steele 1999
                                         “The Feel of Java” - James Gosling 1997


                                        9
1.0                       1.2                           1.4                      6
 •    1996                 •    1998                     •    2002                    •   2006
 •    WORA                 •    Collections              •    JCP                     •   Perf.
 • Bouncing                •    Swing                    •    XML                     •   JConsole
Duke




              1.1                      1.3                           5.0                      7
               •    1997                •     2000                    • 2004                     2011
                                                                                                  •
               •    JDBC                •     Hotspot                 • Generics                 Project
                                                                                                  •
                                                                      • Annotations
               •    JavaBeans                                                                  Coin
Java SE 7 Release Contents
 JSR-336: Java SE 7 Release Contents


• Java Language
  • Project Coin (JSR-334)
• Class Libraries
  • NIO2 (JSR-203)
  • Fork-Join framework, ParallelArray (JSR-166y)
• Java Virtual Machine
  • The DaVinci Machine project (JSR-292)
  • InvokeDynamic bytecode
• Miscellaneous enhancements




                              12
Better Integer Literal


•   Binary literals
    int mask = 0b101010101010;


•   With underscores for clarity

    int mask = 0b1010_1010_1010;
    long big = 9_223_783_036_967_937L;




                                         13
String Switch Statement



• Today case label includes integer constants and
 enum constants
• Strings are constants too (immutable)




                                                    14
Discriminating Strings Today

int monthNameToDays(String s, int year) {

        if("April".equals(s) || "June".equals(s)
||
                        "September".equals(s)
||"November".equals(s))
                return 30;

        if("January".equals(s) ||
"March".equals(s) ||
                "May".equals(s) ||
"July".equals(s) ||
                "August".equals(s) ||
"December".equals(s))
                        return 31;
                                                   15
Strings in Switch Statements
int monthNameToDays(String s, int year) {
 switch(s) {
   case "April": case "June":
   case "September": case "November":
     return 30;

   case "January": case "March":
   case "May": case "July":
   case "August": case "December":
     return 31;

   case "February”:
     ...
   default:
     ...


                                            16
Simplifying Generics


• Pre-generics
 List strList = new ArrayList();




                                   17
Simplifying Generics


• Pre-generics
 List strList = new ArrayList();
• With Generics
  List <String> strList = new ArrayList <String>();
  List<String>                ArrayList<String> ();




                                                      18
Simplifying Generics


• Pre-generics
 List strList = new ArrayList();
• With Generics
  List <String> strList = new ArrayList <String>();
  List<String>                ArrayList<String> ();
  List <Map<String, List<String> > strList =
  List<             List<String>>
   new ArrayList <Map<String, List<String> >();
        ArrayList<            List<String>>




                                                      19
Diamond Operator


• Pre-generics
 List strList = new ArrayList();
• With Generics
  List <String> strList = new ArrayList <String>();
  List<String>                ArrayList<String> ();
  List <Map<String, List<String> > strList =
  List<             List<String>>
   new ArrayList <Map<String, List<String> >();
        ArrayList<            List<String>>

                <>)
• With diamond (<> compiler infers type
  List <String> strList = new ArrayList <>();
  List<String>                 ArrayList<> ();
  List <Map<String, List<String> > strList =
  List<              List<String>>
   new ArrayList <>();
        ArrayList<> ();


                                                      20
Copying a File

InputStream in = new FileInputStream(src);
OutputStream out = new FileOutputStream(dest);

byte[] buf = new byte[8192];
int n;

while (n = in.read(buf)) >= 0)
 out.write(buf, 0, n);




                                                 21
Copying a File (Better, but wrong)

InputStream in = new FileInputStream(src);
OutputStream out = new FileOutputStream(dest);

try {
  byte[] buf = new byte[8192];
  int n;
  while (n = in.read(buf)) >= 0)
    out.write(buf, 0, n);
} finally {
  in.close();
  out.close();
}




                                                 22
Copying a File (Correct, but complex)

InputStream in = new FileInputStream(src);
try {
  OutputStream out = new FileOutputStream(dest);
  try {
    byte[] buf = new byte[8192];
    int n;
    while (n = in.read(buf)) >= 0)
      out.write(buf, 0, n);
  } finally {
    out.close();
  }
} finally {
  in.close();
}


                                                   23
Copying a File (Correct, but complex)

InputStream in = new FileInputStream(src);
try {
  OutputStream out = new FileOutputStream(dest);
  try {
    byte[] buf = new byte[8192];
    int n;
    while (n = in.read(buf)) >= 0)
      out.write(buf, 0, n);
  } finally {
    out.close();
  }
} finally {
                                           Exception thrown from
  in.close();                             potentially three places.
}                                 Details of first two could be lost
Automatic Resource Management

try (InputStream in = new FileInputStream(src),
     OutputStream out = new FileOutputStream(dest))
{
  byte[] buf = new byte[8192];
  int n;
  while (n = in.read(buf)) >= 0)
    out.write(buf, 0, n);
}




                                                      25
The Details


• Compiler de-sugars try-with-resources into nested
  try-finally blocks with variables to track exception state
• Suppressed exceptions are recorded for posterity
  using a new facility of Throwable
• API support in JDK 7
  • New superinterface java.lang.AutoCloseable
  • All AutoCloseable and by extension
    java.io.Closeable types useable with try-with-resources
  • anything with a void close() method is a candidate
  • JDBC 4.1 retrofitted as AutoCloseable too




                                                               26
Exceptions Galore
try {
          ...
}   catch(ClassNotFoundException cnfe) {
          doSomethingClever(cnfe);
          throw cnfe;
}   catch(InstantiationException ie) {
          log(ie);
          throw ie;
}   catch(NoSuchMethodException nsme) {
          log(nsme);
          throw nsme;
}   catch(InvocationTargetException ite) {
          log(ite);
          throw ite;
}



                                             27
Multi-Catch
try {
         ...
} catch (ClassCastException e) {
  doSomethingClever(e);
  throw e;
} catch(InstantiationException |
                  NoSuchMethodException |
                  InvocationTargetException e) {
         log(e);
         throw e;
}




                                                   28
<Insert Picture
                                    Here>


Demo
Project Coin (with Java EE 6)
New I/O 2 (NIO2) Libraries
JSR 203


• Original Java I/O APIs presented challenges for developers
 •   Not designed to be extensible
 •   Many methods do not throw exceptions as expected
 •   rename() method works inconsistently
 •   Developers want greater access to file metadata
• Java NIO2 solves these problems




                                                          30
Java NIO2 Features

• Path is a replacement for File
 • Biggest impact on developers
• Better directory support
 • list() method can stream via iterator
 • Entries can be filtered using regular expressions in API
• Symbolic link support
• java.nio.file.Filesystem
 • interface to a filesystem (FAT, ZFS, Zip archive, network, etc)
• java.nio.file.attribute package
 • Access to file metadata




                                                                     31
java.nio.file.Path
• Equivalent of java.io.File in the new API
  – Immutable
• Have methods to access and manipulate Path
• Few ways to create a Path
 – From Paths and FileSystem
//Make a reference to the path
Path home = Paths.get("/home/fred");

//Resolve tmp from /home/fred -> /home/fred/tmp
Path tmpPath = home.resolve("tmp");

//Create a relative path from tmp -> ..
Path relativePath = tmpPath.relativize(home)

File file = relativePath.toFile();


                                                  32
File Operation – Copy, Move

•   File copy is really easy
    – With fine grain control
       Path src = Paths.get("/home/fred/readme.txt");
       Path dst = Paths.get("/home/fred/copy_readme.txt");

       Files.copy(src, dst,
                       StandardCopyOption.COPY_ATTRIBUTES,
                       StandardCopyOption.REPLACE_EXISTING);


•   File move is supported
    – Optional atomic move supported
       Path src = Paths.get("/home/fred/readme.txt");
       Path dst = Paths.get("/home/fred/readme.1st");
       Files.move(src, dst,
       StandardCopyOption.ATOMIC_MOVE);

                                                             33
Directories
•   DirectoryStream iterate over entries
    –   Scales to large directories
    –   Uses less resources
    –   Smooth out response time for remote file systems
    –   Implements Iterable and Closeable for productivity
•   Filtering support
    – Build-in support for glob, regex and custom filters

        Path srcPath = Paths.get("/home/fred/src");

        try (DirectoryStream<Path> dir =
                        srcPath.newDirectoryStream("*.java")) {
                for (Path file: dir)
                        System.out.println(file.getName());
        }


                                                              34
Concurrency and Collections Updates - JSR 166y


 10,000000

 1,000,000                          Transistors
                                    (1,000s)
  100,000

   10,000

    1,000
                                                        Clock (MHz)
      100

       10

        1

      1970   1975   1980   1985   1990   1995   2000   2005   2010



                                                                      35
ForkJoin Framework

• Goal is to take advantage of multiple processor
• Designed for task that can be broken down into
 smaller pieces
    – Eg. Fibonacci number fib(10) = fib(9) + fib(8)
•   Nearly always recursive
    – Probably not efficient unless it is


    if I can manage the task
            perform the task
    else
            fork task into x number of smaller/similar
    task
            join the results


                                                       36
ForkJoin Example – Fibonacci
public class Fibonacci extends RecursiveTask< Integer> {
                               RecursiveTask<Integer >
   private final int number;
   public Fibonacci(int n) { number = n; }

   @Override protected Integer compute() {
       switch (number) {
           case 0: return (0);
           case 1: return (1);
           default:
                                                 Fibonacci
f1 = new Fibonacci(number – 1);
                                                 Fibonacci
f2 = new Fibonacci(number – 2);
               f1.fork(); f2.fork();
               return (f1.join() + f2.join());
       }
   }
}
                                                             37
ForkJoin Example – Fibonacci

ForkJoinPool pool = new ForkJoinPool();
Fibonacci r = new Fibonacci(10);
pool.submit(r);

while (!r.isDone()) {
        //Do some work
        ...
}

System.out.println("Result of fib(10) =
"+r.get());




                                          38
<Insert Picture
                          Here>


Demo
Fork-Join Framework
invokedynamic

                   Ceylon
 Fantom




            Gosu
                            Kotlin




                                     40
InvokeDynamic Bytecode


• JVM currently has four ways to invoke method
 – Invokevirtual, invokeinterface, invokestatic, invokespecial
• All require full method signature data
• InvokeDynamic will use method handle
 – Effectively an indirect pointer to the method
• When dynamic method is first called bootstrap code
 determines method and creates handle
• Subsequent calls simply reference defined handle
• Type changes force a re-compute of the method
 location and an update to the handle
 – Method call changes are invisible to calling code


                                                                 41
Miscellaneous enhancements

•   JDBC 4.1, RowSet 1.1
•   Security: Elliptic curve cryptography, TLS 1.2
•   Unicode 6
•   JAXP 1.4.4, JAX-WS 2.2, JAXB 2.2
•   Swing: Nimbus L&F, JXLayer, HW accelerations
•   ClassLoader architecture changes
•   close() for URLClassLoader
•   Javadoc support for CSS
• New Objects class



                            42
Other Enhancements
Client & Graphics


• Added Nimbus L&F to the standard
 – Much better –modern- look than what was previously available
• Platform APIs for Java 6u10 Graphics Features
 – Shaped and translucent windows
• JXLayer core included in the standard
 – Formerly SwingLabs component
 – Allows easier layering inside of a component
• Optimized Java2D Rendering Pipeline for X-Windows
 – Allows hardware accelerated remote X




                                                                  43
44
Java 7 : Available today!

•   Plan "B" - Sept. 2010
•   JSR approved - Dec. 2010
•   Java 7 Launch - 07/07
•   JSR Final Approval Ballots
    •   JavaSE 8 passed with 15 YES, 1 NO (Google) votes
    •   Project Coin passed with 16 YES votes
    •   NIO2 passed with 16 YES votes
    •   InvokeDynamic passed with 16 YES votes
•   Java SE 7 Reference Implementation (RI)
•   Java 7 Oracle SDK on July 28th 2011
•   ...
                                 You are
•   Java 7 updates               here
Oracle JDK 7 Updates

• Support for Apple's Mac OS X
 • Use OpenJDK for the time being (easy)
• Expect several JDK 7 update releases
 •   More platform support
 •   Improved performance
 •   Bug fixes
 •   Regular HotRockit* progress
     • remove PermGen (yay!)
     • large heaps with reasonable, then predictable latencies
     • serviceability improvements ported over to HotSpot from
      JRockit
     • JRockit Mission Control
     • JRockit Flight Controler


                                    *: tentative name for the HotSpot/JRockit converged JVM
Java SE 8

            Project Jigsaw (JSR-294)
            Modularizing the Java Platform



            Project Lambda (JSR 335)
            Closures and lambda expressions



            More Project Coin
            Small Language Changes



                       47
More about Java 8

• More Content :
 • Annotations on Java types (JSR 308)
 • Wish List * :
   •   Serialization fixes
   •   Multicast improvements
   •   Java APIs for accessing location, compass and other ”environmental” data (partially exists in ME)
   •   Improved language interop
   •   Faster startup/warmup
   •   Dependency injection (JSR 330)
   •   Include select enhancements from Google Guava
   •   Small Swing enhancements
   •   More security/crypto features, improved support for x.509-style certificates etc
   •   Internationalization: non-Gregorian calendars, more configurable sorting
   •   Date and Time (JSR 310)
   •   Process control API

• Schedule
 • Late 2012 (planning in progress)


                                                                    *: a good number will NOT make the list
Priorities for the Java Platforms

                 Grow Developer Base

                 Grow Adoption

                 Increase Competitiveness

                Adapt to change
Java Communities
• Free and Open Source Software (FOSS)
• Open to all
 • Corporate contributors: Oracle, RedHat, IBM, Apple, SAP
 • Key individual contributors
 • Ratified By-laws
• Serves as the JavaSE reference implementation (RI)
• Where java.next is being developed
• http://openjdk.org
How Java Evolves and Adapts




             Community Development of
                 Java Technology
                  Specifications
JCP Reforms


• Developers voice in the Executive Committees
 • SOUJava
 • London JavaCommunity

• JCP starting a program of reform
 • JSR 348: Towards a new version of the JCP (JCP.next)
 • First of two JSRs to update the JCP itself
Conclusions

• Java SE 7
 • Incremental changes
 • Evolutionary, not revolutionary
 • Good solid set of features to make developers life easier
• OpenJDK as a thriving open source project
• Java SE 8
 • Major new features: Modularization and Closures
 • More smaller features to be defined
• Java continues to grow and adapt to the challenges
• Community play required



                                55
57
Java7 normandyjug

Weitere ähnliche Inhalte

Was ist angesagt?

Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ivan Zoratti
 
Couchdbkit djangocong-20100425
Couchdbkit djangocong-20100425Couchdbkit djangocong-20100425
Couchdbkit djangocong-20100425
guest4f2eea
 
[B14] A MySQL Replacement by Colin Charles
[B14] A MySQL Replacement by Colin Charles[B14] A MySQL Replacement by Colin Charles
[B14] A MySQL Replacement by Colin Charles
Insight Technology, Inc.
 
No SQL, No problem - using MongoDB in Ruby
No SQL, No problem - using MongoDB in RubyNo SQL, No problem - using MongoDB in Ruby
No SQL, No problem - using MongoDB in Ruby
sbeam
 
Tracking Page Changes for Your Database and Bitmap Backups
Tracking Page Changes for Your Database and Bitmap BackupsTracking Page Changes for Your Database and Bitmap Backups
Tracking Page Changes for Your Database and Bitmap Backups
Laurynas Biveinis
 

Was ist angesagt? (18)

High-Performance Storage Services with HailDB and Java
High-Performance Storage Services with HailDB and JavaHigh-Performance Storage Services with HailDB and Java
High-Performance Storage Services with HailDB and Java
 
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
 
Cassandra 3.0
Cassandra 3.0Cassandra 3.0
Cassandra 3.0
 
Couchdbkit djangocong-20100425
Couchdbkit djangocong-20100425Couchdbkit djangocong-20100425
Couchdbkit djangocong-20100425
 
MySQL 5.7 + JSON
MySQL 5.7 + JSONMySQL 5.7 + JSON
MySQL 5.7 + JSON
 
MySQL 8 for Developers
MySQL 8 for DevelopersMySQL 8 for Developers
MySQL 8 for Developers
 
[B14] A MySQL Replacement by Colin Charles
[B14] A MySQL Replacement by Colin Charles[B14] A MySQL Replacement by Colin Charles
[B14] A MySQL Replacement by Colin Charles
 
Augmenting RDBMS with MongoDB for ecommerce
Augmenting RDBMS with MongoDB for ecommerceAugmenting RDBMS with MongoDB for ecommerce
Augmenting RDBMS with MongoDB for ecommerce
 
Java FX 2.0 - A Developer's Guide
Java FX 2.0 - A Developer's GuideJava FX 2.0 - A Developer's Guide
Java FX 2.0 - A Developer's Guide
 
No SQL, No problem - using MongoDB in Ruby
No SQL, No problem - using MongoDB in RubyNo SQL, No problem - using MongoDB in Ruby
No SQL, No problem - using MongoDB in Ruby
 
The MySQL Server ecosystem in 2016
The MySQL Server ecosystem in 2016The MySQL Server ecosystem in 2016
The MySQL Server ecosystem in 2016
 
MySQL JSON Functions
MySQL JSON FunctionsMySQL JSON Functions
MySQL JSON Functions
 
My sql tutorial-oscon-2012
My sql tutorial-oscon-2012My sql tutorial-oscon-2012
My sql tutorial-oscon-2012
 
What is MariaDB Server 10.3?
What is MariaDB Server 10.3?What is MariaDB Server 10.3?
What is MariaDB Server 10.3?
 
Diving into MySQL 5.7: advanced features
Diving into MySQL 5.7: advanced featuresDiving into MySQL 5.7: advanced features
Diving into MySQL 5.7: advanced features
 
Modern solutions for modern database load: improvements in the latest MariaDB...
Modern solutions for modern database load: improvements in the latest MariaDB...Modern solutions for modern database load: improvements in the latest MariaDB...
Modern solutions for modern database load: improvements in the latest MariaDB...
 
Tracking Page Changes for Your Database and Bitmap Backups
Tracking Page Changes for Your Database and Bitmap BackupsTracking Page Changes for Your Database and Bitmap Backups
Tracking Page Changes for Your Database and Bitmap Backups
 
Database Sharding the Right Way: Easy, Reliable, and Open source - HighLoad++...
Database Sharding the Right Way: Easy, Reliable, and Open source - HighLoad++...Database Sharding the Right Way: Easy, Reliable, and Open source - HighLoad++...
Database Sharding the Right Way: Easy, Reliable, and Open source - HighLoad++...
 

Andere mochten auch

Andere mochten auch (7)

[Codeurs en seine] management & monitoring cloud
[Codeurs en seine] management & monitoring cloud[Codeurs en seine] management & monitoring cloud
[Codeurs en seine] management & monitoring cloud
 
What makes groovy groovy codeurs en seine - 2013 - light size
What makes groovy groovy   codeurs en seine - 2013 - light sizeWhat makes groovy groovy   codeurs en seine - 2013 - light size
What makes groovy groovy codeurs en seine - 2013 - light size
 
Découvrez les bases de l’ergonomie web : donnez à vos utilisateurs le meilleu...
Découvrez les bases de l’ergonomie web : donnez à vos utilisateurs le meilleu...Découvrez les bases de l’ergonomie web : donnez à vos utilisateurs le meilleu...
Découvrez les bases de l’ergonomie web : donnez à vos utilisateurs le meilleu...
 
Codeurs En Seine - Lean startup - Matthieu Garde-Lebreton
Codeurs En Seine - Lean startup - Matthieu Garde-LebretonCodeurs En Seine - Lean startup - Matthieu Garde-Lebreton
Codeurs En Seine - Lean startup - Matthieu Garde-Lebreton
 
Capacity Planning : Pratiques et outils pour regarder la foudre tomber sans p...
Capacity Planning : Pratiques et outils pour regarder la foudre tomber sans p...Capacity Planning : Pratiques et outils pour regarder la foudre tomber sans p...
Capacity Planning : Pratiques et outils pour regarder la foudre tomber sans p...
 
NIO and NIO2
NIO and NIO2NIO and NIO2
NIO and NIO2
 
Fork / Join, Parallel Arrays, Lambdas : la programmation parallèle (trop ?) f...
Fork / Join, Parallel Arrays, Lambdas : la programmation parallèle (trop ?) f...Fork / Join, Parallel Arrays, Lambdas : la programmation parallèle (trop ?) f...
Fork / Join, Parallel Arrays, Lambdas : la programmation parallèle (trop ?) f...
 

Ähnlich wie Java7 normandyjug

Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011
Agora Group
 
DevLOVE Beautiful Development - 第一幕 陽の巻
DevLOVE Beautiful Development - 第一幕 陽の巻DevLOVE Beautiful Development - 第一幕 陽の巻
DevLOVE Beautiful Development - 第一幕 陽の巻
都元ダイスケ Miyamoto
 
Charles nutter star techconf 2011 - jvm languages
Charles nutter   star techconf 2011 - jvm languagesCharles nutter   star techconf 2011 - jvm languages
Charles nutter star techconf 2011 - jvm languages
StarTech Conference
 
Advanced JavaScript Development
Advanced JavaScript DevelopmentAdvanced JavaScript Development
Advanced JavaScript Development
Jussi Pohjolainen
 

Ähnlich wie Java7 normandyjug (20)

Java10 and Java11 at JJUG CCC 2018 Spr
Java10 and Java11 at JJUG CCC 2018 SprJava10 and Java11 at JJUG CCC 2018 Spr
Java10 and Java11 at JJUG CCC 2018 Spr
 
Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011
 
Ensuring High Availability for Real-time Analytics featuring Boxed Ice / Serv...
Ensuring High Availability for Real-time Analytics featuring Boxed Ice / Serv...Ensuring High Availability for Real-time Analytics featuring Boxed Ice / Serv...
Ensuring High Availability for Real-time Analytics featuring Boxed Ice / Serv...
 
MongoDB: Optimising for Performance, Scale & Analytics
MongoDB: Optimising for Performance, Scale & AnalyticsMongoDB: Optimising for Performance, Scale & Analytics
MongoDB: Optimising for Performance, Scale & Analytics
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
Adding Riak to your NoSQL Bag of Tricks
Adding Riak to your NoSQL Bag of TricksAdding Riak to your NoSQL Bag of Tricks
Adding Riak to your NoSQL Bag of Tricks
 
Optimizing MongoDB: Lessons Learned at Localytics
Optimizing MongoDB: Lessons Learned at LocalyticsOptimizing MongoDB: Lessons Learned at Localytics
Optimizing MongoDB: Lessons Learned at Localytics
 
みんなのNode.js
みんなのNode.jsみんなのNode.js
みんなのNode.js
 
Using Spring with NoSQL databases (SpringOne China 2012)
Using Spring with NoSQL databases (SpringOne China 2012)Using Spring with NoSQL databases (SpringOne China 2012)
Using Spring with NoSQL databases (SpringOne China 2012)
 
DevLOVE Beautiful Development - 第一幕 陽の巻
DevLOVE Beautiful Development - 第一幕 陽の巻DevLOVE Beautiful Development - 第一幕 陽の巻
DevLOVE Beautiful Development - 第一幕 陽の巻
 
Scala Introduction
Scala IntroductionScala Introduction
Scala Introduction
 
NOSQL, CouchDB, and the Cloud
NOSQL, CouchDB, and the CloudNOSQL, CouchDB, and the Cloud
NOSQL, CouchDB, and the Cloud
 
Tampering with JavaScript
Tampering with JavaScriptTampering with JavaScript
Tampering with JavaScript
 
JVM Under the Hood
JVM Under the HoodJVM Under the Hood
JVM Under the Hood
 
Is NoSQL The Future of Data Storage?
Is NoSQL The Future of Data Storage?Is NoSQL The Future of Data Storage?
Is NoSQL The Future of Data Storage?
 
Практики применения JRuby
Практики применения JRubyПрактики применения JRuby
Практики применения JRuby
 
Novalug 07142012
Novalug 07142012Novalug 07142012
Novalug 07142012
 
Charles nutter star techconf 2011 - jvm languages
Charles nutter   star techconf 2011 - jvm languagesCharles nutter   star techconf 2011 - jvm languages
Charles nutter star techconf 2011 - jvm languages
 
An Introduction to Basics of Search and Relevancy with Apache Solr
An Introduction to Basics of Search and Relevancy with Apache SolrAn Introduction to Basics of Search and Relevancy with Apache Solr
An Introduction to Basics of Search and Relevancy with Apache Solr
 
Advanced JavaScript Development
Advanced JavaScript DevelopmentAdvanced JavaScript Development
Advanced JavaScript Development
 

Mehr von Normandy JUG

Couche Base par Tugdual Grall
Couche Base par Tugdual GrallCouche Base par Tugdual Grall
Couche Base par Tugdual Grall
Normandy JUG
 
Hibernate vs le_cloud_computing
Hibernate vs le_cloud_computingHibernate vs le_cloud_computing
Hibernate vs le_cloud_computing
Normandy JUG
 

Mehr von Normandy JUG (20)

Gatling : Faites tomber la foudre sur votre serveur ! (Stéphane Landelle)
Gatling : Faites tomber la foudre sur votre serveur ! (Stéphane Landelle)Gatling : Faites tomber la foudre sur votre serveur ! (Stéphane Landelle)
Gatling : Faites tomber la foudre sur votre serveur ! (Stéphane Landelle)
 
Soirée Ceylon avec Stéphane Epardaud
Soirée Ceylon avec Stéphane EpardaudSoirée Ceylon avec Stéphane Epardaud
Soirée Ceylon avec Stéphane Epardaud
 
Soirée Guava et Lombok avec Thierry Leriche
Soirée Guava et Lombok avec Thierry LericheSoirée Guava et Lombok avec Thierry Leriche
Soirée Guava et Lombok avec Thierry Leriche
 
Couche Base par Tugdual Grall
Couche Base par Tugdual GrallCouche Base par Tugdual Grall
Couche Base par Tugdual Grall
 
Apache, osgi and karaf par Guillaume Nodet
Apache, osgi and karaf par Guillaume NodetApache, osgi and karaf par Guillaume Nodet
Apache, osgi and karaf par Guillaume Nodet
 
Mockito - Design + tests par Brice Duteil
Mockito - Design + tests par Brice DuteilMockito - Design + tests par Brice Duteil
Mockito - Design + tests par Brice Duteil
 
Annotations Java par Olivier Croisier
Annotations Java par Olivier CroisierAnnotations Java par Olivier Croisier
Annotations Java par Olivier Croisier
 
Spring Batch 17-05-2011
Spring Batch 17-05-2011Spring Batch 17-05-2011
Spring Batch 17-05-2011
 
ATR2011 - Planning poker
ATR2011 - Planning pokerATR2011 - Planning poker
ATR2011 - Planning poker
 
ATR2011 - Scrum dans les tranchées Normandes
ATR2011 - Scrum dans les tranchées NormandesATR2011 - Scrum dans les tranchées Normandes
ATR2011 - Scrum dans les tranchées Normandes
 
Hibernate vs le_cloud_computing
Hibernate vs le_cloud_computingHibernate vs le_cloud_computing
Hibernate vs le_cloud_computing
 
HTML5 en projet
HTML5 en projetHTML5 en projet
HTML5 en projet
 
Git
GitGit
Git
 
Soirée BPM - Introduction Logica
Soirée BPM - Introduction LogicaSoirée BPM - Introduction Logica
Soirée BPM - Introduction Logica
 
Soirée BPM - Bonita Soft
Soirée BPM - Bonita SoftSoirée BPM - Bonita Soft
Soirée BPM - Bonita Soft
 
AT2010 Keynote de cloture
AT2010 Keynote de clotureAT2010 Keynote de cloture
AT2010 Keynote de cloture
 
AT2010 Kanban au secours des équipes sysadmin et support
AT2010 Kanban au secours des équipes sysadmin et supportAT2010 Kanban au secours des équipes sysadmin et support
AT2010 Kanban au secours des équipes sysadmin et support
 
AT2010 Introduction à scrum
AT2010 Introduction à scrumAT2010 Introduction à scrum
AT2010 Introduction à scrum
 
AT2010 Dojo TDD
AT2010 Dojo TDDAT2010 Dojo TDD
AT2010 Dojo TDD
 
AT2010 Keynote
AT2010 KeynoteAT2010 Keynote
AT2010 Keynote
 

Kürzlich hochgeladen

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Kürzlich hochgeladen (20)

Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 

Java7 normandyjug

  • 2. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 2
  • 3. Priorities for the Java Platforms Grow Developer Base Grow Adoption Increase Competitiveness Adapt to change
  • 4. A long long time ago...
  • 5. 1.0 • 1996 • WORA • Bouncing Duke
  • 6. 1.0 1.2 1.4 • 1996 • 1998 • 2002 • WORA • Collections • JCP • Bouncing • Swing • XML Duke 1.1 1.3 • 1997 • 2000 • JDBC • Hotspot • JavaBeans
  • 7. 1.0 1.2 1.4 6 • 1996 • 1998 • 2002 • 2006 • WORA • Collections • JCP • Perf. • Bouncing • Swing • XML • JConsole Duke 1.1 1.3 5.0 • 1997 • 2000 • 2004 • JDBC • Hotspot • Generics • JavaBeans • Annotations
  • 8.
  • 9. Evolving the Language From “Evolving the Java Language” - JavaOne 2005 • Java language principles – Reading is more important than writing – Code should be a joy to read – The language should not hide what is happening – Code should do what it seems to do – Simplicity matters – Every “good” feature adds more “bad” weight – Sometimes it is best to leave things out • One language: with the same meaning everywhere • No dialects • We will evolve the Java language • But cautiously, with a long term view • “first do no harm” also “Growing a Language” - Guy Steele 1999 “The Feel of Java” - James Gosling 1997 9
  • 10.
  • 11. 1.0 1.2 1.4 6 • 1996 • 1998 • 2002 • 2006 • WORA • Collections • JCP • Perf. • Bouncing • Swing • XML • JConsole Duke 1.1 1.3 5.0 7 • 1997 • 2000 • 2004 2011 • • JDBC • Hotspot • Generics Project • • Annotations • JavaBeans Coin
  • 12. Java SE 7 Release Contents JSR-336: Java SE 7 Release Contents • Java Language • Project Coin (JSR-334) • Class Libraries • NIO2 (JSR-203) • Fork-Join framework, ParallelArray (JSR-166y) • Java Virtual Machine • The DaVinci Machine project (JSR-292) • InvokeDynamic bytecode • Miscellaneous enhancements 12
  • 13. Better Integer Literal • Binary literals int mask = 0b101010101010; • With underscores for clarity int mask = 0b1010_1010_1010; long big = 9_223_783_036_967_937L; 13
  • 14. String Switch Statement • Today case label includes integer constants and enum constants • Strings are constants too (immutable) 14
  • 15. Discriminating Strings Today int monthNameToDays(String s, int year) { if("April".equals(s) || "June".equals(s) || "September".equals(s) ||"November".equals(s)) return 30; if("January".equals(s) || "March".equals(s) || "May".equals(s) || "July".equals(s) || "August".equals(s) || "December".equals(s)) return 31; 15
  • 16. Strings in Switch Statements int monthNameToDays(String s, int year) { switch(s) { case "April": case "June": case "September": case "November": return 30; case "January": case "March": case "May": case "July": case "August": case "December": return 31; case "February”: ... default: ... 16
  • 17. Simplifying Generics • Pre-generics List strList = new ArrayList(); 17
  • 18. Simplifying Generics • Pre-generics List strList = new ArrayList(); • With Generics List <String> strList = new ArrayList <String>(); List<String> ArrayList<String> (); 18
  • 19. Simplifying Generics • Pre-generics List strList = new ArrayList(); • With Generics List <String> strList = new ArrayList <String>(); List<String> ArrayList<String> (); List <Map<String, List<String> > strList = List< List<String>> new ArrayList <Map<String, List<String> >(); ArrayList< List<String>> 19
  • 20. Diamond Operator • Pre-generics List strList = new ArrayList(); • With Generics List <String> strList = new ArrayList <String>(); List<String> ArrayList<String> (); List <Map<String, List<String> > strList = List< List<String>> new ArrayList <Map<String, List<String> >(); ArrayList< List<String>> <>) • With diamond (<> compiler infers type List <String> strList = new ArrayList <>(); List<String> ArrayList<> (); List <Map<String, List<String> > strList = List< List<String>> new ArrayList <>(); ArrayList<> (); 20
  • 21. Copying a File InputStream in = new FileInputStream(src); OutputStream out = new FileOutputStream(dest); byte[] buf = new byte[8192]; int n; while (n = in.read(buf)) >= 0) out.write(buf, 0, n); 21
  • 22. Copying a File (Better, but wrong) InputStream in = new FileInputStream(src); OutputStream out = new FileOutputStream(dest); try { byte[] buf = new byte[8192]; int n; while (n = in.read(buf)) >= 0) out.write(buf, 0, n); } finally { in.close(); out.close(); } 22
  • 23. Copying a File (Correct, but complex) InputStream in = new FileInputStream(src); try { OutputStream out = new FileOutputStream(dest); try { byte[] buf = new byte[8192]; int n; while (n = in.read(buf)) >= 0) out.write(buf, 0, n); } finally { out.close(); } } finally { in.close(); } 23
  • 24. Copying a File (Correct, but complex) InputStream in = new FileInputStream(src); try { OutputStream out = new FileOutputStream(dest); try { byte[] buf = new byte[8192]; int n; while (n = in.read(buf)) >= 0) out.write(buf, 0, n); } finally { out.close(); } } finally { Exception thrown from in.close(); potentially three places. } Details of first two could be lost
  • 25. Automatic Resource Management try (InputStream in = new FileInputStream(src), OutputStream out = new FileOutputStream(dest)) { byte[] buf = new byte[8192]; int n; while (n = in.read(buf)) >= 0) out.write(buf, 0, n); } 25
  • 26. The Details • Compiler de-sugars try-with-resources into nested try-finally blocks with variables to track exception state • Suppressed exceptions are recorded for posterity using a new facility of Throwable • API support in JDK 7 • New superinterface java.lang.AutoCloseable • All AutoCloseable and by extension java.io.Closeable types useable with try-with-resources • anything with a void close() method is a candidate • JDBC 4.1 retrofitted as AutoCloseable too 26
  • 27. Exceptions Galore try { ... } catch(ClassNotFoundException cnfe) { doSomethingClever(cnfe); throw cnfe; } catch(InstantiationException ie) { log(ie); throw ie; } catch(NoSuchMethodException nsme) { log(nsme); throw nsme; } catch(InvocationTargetException ite) { log(ite); throw ite; } 27
  • 28. Multi-Catch try { ... } catch (ClassCastException e) { doSomethingClever(e); throw e; } catch(InstantiationException | NoSuchMethodException | InvocationTargetException e) { log(e); throw e; } 28
  • 29. <Insert Picture Here> Demo Project Coin (with Java EE 6)
  • 30. New I/O 2 (NIO2) Libraries JSR 203 • Original Java I/O APIs presented challenges for developers • Not designed to be extensible • Many methods do not throw exceptions as expected • rename() method works inconsistently • Developers want greater access to file metadata • Java NIO2 solves these problems 30
  • 31. Java NIO2 Features • Path is a replacement for File • Biggest impact on developers • Better directory support • list() method can stream via iterator • Entries can be filtered using regular expressions in API • Symbolic link support • java.nio.file.Filesystem • interface to a filesystem (FAT, ZFS, Zip archive, network, etc) • java.nio.file.attribute package • Access to file metadata 31
  • 32. java.nio.file.Path • Equivalent of java.io.File in the new API – Immutable • Have methods to access and manipulate Path • Few ways to create a Path – From Paths and FileSystem //Make a reference to the path Path home = Paths.get("/home/fred"); //Resolve tmp from /home/fred -> /home/fred/tmp Path tmpPath = home.resolve("tmp"); //Create a relative path from tmp -> .. Path relativePath = tmpPath.relativize(home) File file = relativePath.toFile(); 32
  • 33. File Operation – Copy, Move • File copy is really easy – With fine grain control Path src = Paths.get("/home/fred/readme.txt"); Path dst = Paths.get("/home/fred/copy_readme.txt"); Files.copy(src, dst, StandardCopyOption.COPY_ATTRIBUTES, StandardCopyOption.REPLACE_EXISTING); • File move is supported – Optional atomic move supported Path src = Paths.get("/home/fred/readme.txt"); Path dst = Paths.get("/home/fred/readme.1st"); Files.move(src, dst, StandardCopyOption.ATOMIC_MOVE); 33
  • 34. Directories • DirectoryStream iterate over entries – Scales to large directories – Uses less resources – Smooth out response time for remote file systems – Implements Iterable and Closeable for productivity • Filtering support – Build-in support for glob, regex and custom filters Path srcPath = Paths.get("/home/fred/src"); try (DirectoryStream<Path> dir = srcPath.newDirectoryStream("*.java")) { for (Path file: dir) System.out.println(file.getName()); } 34
  • 35. Concurrency and Collections Updates - JSR 166y 10,000000 1,000,000 Transistors (1,000s) 100,000 10,000 1,000 Clock (MHz) 100 10 1 1970 1975 1980 1985 1990 1995 2000 2005 2010 35
  • 36. ForkJoin Framework • Goal is to take advantage of multiple processor • Designed for task that can be broken down into smaller pieces – Eg. Fibonacci number fib(10) = fib(9) + fib(8) • Nearly always recursive – Probably not efficient unless it is if I can manage the task perform the task else fork task into x number of smaller/similar task join the results 36
  • 37. ForkJoin Example – Fibonacci public class Fibonacci extends RecursiveTask< Integer> { RecursiveTask<Integer > private final int number; public Fibonacci(int n) { number = n; } @Override protected Integer compute() { switch (number) { case 0: return (0); case 1: return (1); default: Fibonacci f1 = new Fibonacci(number – 1); Fibonacci f2 = new Fibonacci(number – 2); f1.fork(); f2.fork(); return (f1.join() + f2.join()); } } } 37
  • 38. ForkJoin Example – Fibonacci ForkJoinPool pool = new ForkJoinPool(); Fibonacci r = new Fibonacci(10); pool.submit(r); while (!r.isDone()) { //Do some work ... } System.out.println("Result of fib(10) = "+r.get()); 38
  • 39. <Insert Picture Here> Demo Fork-Join Framework
  • 40. invokedynamic Ceylon Fantom Gosu Kotlin 40
  • 41. InvokeDynamic Bytecode • JVM currently has four ways to invoke method – Invokevirtual, invokeinterface, invokestatic, invokespecial • All require full method signature data • InvokeDynamic will use method handle – Effectively an indirect pointer to the method • When dynamic method is first called bootstrap code determines method and creates handle • Subsequent calls simply reference defined handle • Type changes force a re-compute of the method location and an update to the handle – Method call changes are invisible to calling code 41
  • 42. Miscellaneous enhancements • JDBC 4.1, RowSet 1.1 • Security: Elliptic curve cryptography, TLS 1.2 • Unicode 6 • JAXP 1.4.4, JAX-WS 2.2, JAXB 2.2 • Swing: Nimbus L&F, JXLayer, HW accelerations • ClassLoader architecture changes • close() for URLClassLoader • Javadoc support for CSS • New Objects class 42
  • 43. Other Enhancements Client & Graphics • Added Nimbus L&F to the standard – Much better –modern- look than what was previously available • Platform APIs for Java 6u10 Graphics Features – Shaped and translucent windows • JXLayer core included in the standard – Formerly SwingLabs component – Allows easier layering inside of a component • Optimized Java2D Rendering Pipeline for X-Windows – Allows hardware accelerated remote X 43
  • 44. 44
  • 45. Java 7 : Available today! • Plan "B" - Sept. 2010 • JSR approved - Dec. 2010 • Java 7 Launch - 07/07 • JSR Final Approval Ballots • JavaSE 8 passed with 15 YES, 1 NO (Google) votes • Project Coin passed with 16 YES votes • NIO2 passed with 16 YES votes • InvokeDynamic passed with 16 YES votes • Java SE 7 Reference Implementation (RI) • Java 7 Oracle SDK on July 28th 2011 • ... You are • Java 7 updates here
  • 46. Oracle JDK 7 Updates • Support for Apple's Mac OS X • Use OpenJDK for the time being (easy) • Expect several JDK 7 update releases • More platform support • Improved performance • Bug fixes • Regular HotRockit* progress • remove PermGen (yay!) • large heaps with reasonable, then predictable latencies • serviceability improvements ported over to HotSpot from JRockit • JRockit Mission Control • JRockit Flight Controler *: tentative name for the HotSpot/JRockit converged JVM
  • 47. Java SE 8 Project Jigsaw (JSR-294) Modularizing the Java Platform Project Lambda (JSR 335) Closures and lambda expressions More Project Coin Small Language Changes 47
  • 48. More about Java 8 • More Content : • Annotations on Java types (JSR 308) • Wish List * : • Serialization fixes • Multicast improvements • Java APIs for accessing location, compass and other ”environmental” data (partially exists in ME) • Improved language interop • Faster startup/warmup • Dependency injection (JSR 330) • Include select enhancements from Google Guava • Small Swing enhancements • More security/crypto features, improved support for x.509-style certificates etc • Internationalization: non-Gregorian calendars, more configurable sorting • Date and Time (JSR 310) • Process control API • Schedule • Late 2012 (planning in progress) *: a good number will NOT make the list
  • 49. Priorities for the Java Platforms Grow Developer Base Grow Adoption Increase Competitiveness Adapt to change
  • 51. • Free and Open Source Software (FOSS) • Open to all • Corporate contributors: Oracle, RedHat, IBM, Apple, SAP • Key individual contributors • Ratified By-laws • Serves as the JavaSE reference implementation (RI) • Where java.next is being developed • http://openjdk.org
  • 52. How Java Evolves and Adapts Community Development of Java Technology Specifications
  • 53. JCP Reforms • Developers voice in the Executive Committees • SOUJava • London JavaCommunity • JCP starting a program of reform • JSR 348: Towards a new version of the JCP (JCP.next) • First of two JSRs to update the JCP itself
  • 54. Conclusions • Java SE 7 • Incremental changes • Evolutionary, not revolutionary • Good solid set of features to make developers life easier • OpenJDK as a thriving open source project • Java SE 8 • Major new features: Modularization and Closures • More smaller features to be defined • Java continues to grow and adapt to the challenges • Community play required 55
  • 55. 57