SlideShare a Scribd company logo
1 of 29
Download to read offline
WHAT’S COMING IN JAVA SE 7



              MARKO ŠTRUKELJ
              PARSEK
JAVA SE 7

 • Feature set not specified yet
 • JSR not created yet
 • Many different API, library, and framework efforts
   aiming for inclusion
 • Early Access downloads available:
    – Java SE 7 EA
    – Open JDK
 • Release expected summer 2009 at the earliest
FOCUS

 • Focus on (as claimed by Sun):
    – Multiple languages support
    – Modularity
    – Rich clients


 • Plus the usual:
    – API updates and language enhancements
    – Performance
SOME LANGUAGE ENHANCEMENTS

    – Modules
    – Annotations extensions
    – Strings in switch statements
    – Closures
    – Try catch syntax improvement
    – Enum comparisons
SOME API UPDATES

 • New I/O version 2
 • JMX 2.0
MODULE SYSTEM (JSR-277)

        • Introduce mandatory and consistent versioning
          and dependency meta info
        • Integrate versioned dependencies with
          classloading
        • Introduce new packaging system – JAM archives,
          and module repositories to store and serve the
          content of these archives.
        • Introduce a scope that’s less than public but more
          than package-private to improve hiding of non-api
          classes
MODULE SCOPE - LESS THAN PUBLIC, MORE THAN PACKAGE PRIVATE


:: com/company/util/ImageUtils.java   ::com/company/util/impl/OSHacks.java
package com.company.util;             package com.company.util.impl;

public class ImageUtils {             public class OSHacks {
  ... OSHacks.callConvert();            public callConvert() {...}
}                                     }
MODULE SCOPE - LESS THAN PUBLIC, MORE THAN PACKAGE PRIVATE
:: com/company/util/ImageUtils.java   ::com/company/util/impl/OSHacks.java
module com.company.util;              module com.company.util;
package com.company.util;             package com.company.util.impl;

public class ImageUtils {             module class OSHacks {
  ... OSHacks.callConvert();            module callConvert() {...}
}                                     }
:: com/company/util/module-info.java
@Version(“1.0”)
@ImportModule(name=“java.se.core”, version=“1.7+”)
@ExportResources({“schemas/**”})
module com.company.util;
MODULE SYSTEM (JSR-277)

 • JAM file - like JAR but more stringent meta
   data requirements
     – Can contain jars, native libraries, resources ...
     – Module definition info and dependencies
       specified through annotations
 • Repositories implemented at API level
     – You can implement custom repositories and
       plug them into the module system.
MODULE SYSTEM (JSR-277)

     – bootstrap repository (java.* classes)
       contains quot;java.sequot; module - implicitly imported
     – system-wide runtime repository (versioned
       global libraries)
     – user repository
     – application repository - on the fly at app
       startup - when application not installed in
       system repository
ANNOTATIONS ON JAVA TYPES (JSR-308)

 • Catch more errors at compile time
     – You’ll be able to put annotation in more places
     – Type use:
         • List<@NonNull String> keys;


     – @NonNull, @Interned, @Readonly,
       @Immutable
LANGUAGE ENHANCEMENTS - IMPROVED TRY-CATCH

    Motivation: prevent code repetition

    try {
      ... someCall();
    } catch(IllegalArgumentException, IOException e) {
      log.warn(“We expected that, moving on ...: ”, e);
    } catch(Exception e) {
      log.error();
      throw e;
    }
LANGUAGE ENHANCEMENTS – SAFE RETHROW

    Motivation: prevent code repetition

    public void test() throws E1, E2 {
      try {
         ... someCall();
      } catch(final Throwable ex) {
        log.error(“error: “, ex);
        throw ex;
      }
    }
LANGUAGE ENHANCEMENTS – ENUM COMPARISON

    Motivation: improve usability and readability

    enum Size {SMALL, MEDIUM, LARGE};
    Size mySize, yourSize;
    ...
    if (mySize < yourSize) {
       ...
    }
LANGUAGE ENHANCEMENTS – STRINGS IN SWITCH STATEMENTS

     Motivation: improve usability and readability

     switch(val) {
       case “true”:
       case “yes”:
         return true;
       case “false”:
         return false;
       default:
         throw new IllegalArgumentException(“Wrong value: ” + val);
     }
LANGUAGE ENHANCEMENTS - JBBA CLOSURES PROPOSAL

 • What are closures?

 Thread t = new Thread(new Runnable() {
     public void run() {
        doSomething();
     }
 });
LANGUAGE ENHANCEMENTS - CLOSURES

 • Couldn’t we have something like

 Thread t = new Thread({ =>
       doSomething();
   });

 • Motivation: reduce boilerplate
LANGUAGE ENHANCEMENTS - CLOSURES
 Connection con = ds.getConnection();
 con.use({ =>
     ps = con.prepareStatement(...);
     ...
 }); // connection will automatically be closed

 • Motivation: automatic resource cleanup, remove a whole
   class of errors – i.e. make connection leak impossible
LANGUAGE ENHANCEMENTS - CLOSURES
 Double highestGpa = students
   .withFilter( { Student s => (s.graduation ==
   THIS_YEAR)} )
   .withMapping( { Student s => s.gpa } )
   .max();


 • Motivation: express a data processing algorithm
   in clean and short form that is parallelism-
   agnostic
API UPDATES – NEW I/O 2 (JSR-203)

     – copying, moving files
     – symbolic links support
     – file change notification (watch service)
     – file attributes
     – efficient file tree walking
     – path name manipulation
     – pluggable FileSystem providers
API UPDATES – NEW I/O 2 (JSR-203)


 Path home = Path.get(quot;/home/user1quot;);
 Path profile = home.resolve(quot;.profilequot;);
 profile.copyTo(home.resolve(quot;.profile.bakquot;),
   REPLACE_EXISTING, COPY_ATTRIBUTES);
API UPDATES – NEW I/O 2 (JSR-203)

     – java.nio.file
     – java.nio.file.attribute
     – interoperability with java.io

     File srcFile = new File(“/home/user1/file.txt”);
     File destFile = new File(“/home/user1/file2.txt”);
     srcFile.getFileRef().copyTo(destFile.getFileRef());
API UPDATES – JMX 2.0



  • Use annotations to turn POJOs into MBeans.
    (JSR-255)
  • There is also a new standard to access
    management services remotely through web
    services - interoperable with .NET (JSR-262)
NEW APIS

  • New Date and Time API (JSR-310)
    (implemented in Joda-Time library)
FORK-JOIN CONCURRENCY API (JSR-166)

  Fine-grained parallel computation framework
    based on divide-and-conquer and work-stealing

  Double highestGpa = students
    .withFilter( { Student s => (s.graduation ==
    THIS_YEAR)} )
    .withMapping( { Student s => s.gpa } )
    .max();
BEANS VALIDATION FRAMEWORK (JSR-303)

 Constraints via annotations (like in Hibernate
  Validator)

     – @NotNull, @NotEmpty
     – @Min(value=), @Max(value=)
     – @Length(min=, max=), @Range(min=,max=)
     – @Past/@Future, @Email
SOME OTHER STUFF – NEW GARBAGE COLLECTOR

 • Garbage first (G1) garbage collector
     – Parallel, concurrent – makes good use of
       multiple native threads (fast)
     – Generational – segments the heap and gives
       different attention to different segments (fast)
     – High throughput (fast)
     – Compacting – efficient memory use – but
       takes most of GC processing time (slow)
SOME OTHER STUFF – JAVA FX

  • A new scripting language and a whole set
    of APIs for building rich GUIs
     – Motivation: finally make UI development easy
       for GUI, multimedia applications, vector
       graphics, animation, rich internet applications
       ... Compete with AIR and Silverlight
     – JavaFX Script
     – Swing enhancements (JWebPane ... )
     – Java Media Components

More Related Content

What's hot

Using Ruby on Rails with legacy Oracle databases
Using Ruby on Rails with legacy Oracle databasesUsing Ruby on Rails with legacy Oracle databases
Using Ruby on Rails with legacy Oracle databasesRaimonds Simanovskis
 
Resthub framework presentation
Resthub framework presentationResthub framework presentation
Resthub framework presentationSébastien Deleuze
 
Fifty Features of Java EE 7 in 50 Minutes
Fifty Features of Java EE 7 in 50 MinutesFifty Features of Java EE 7 in 50 Minutes
Fifty Features of Java EE 7 in 50 Minutesglassfish
 
Testing Your Application On Google App Engine
Testing Your Application On Google App EngineTesting Your Application On Google App Engine
Testing Your Application On Google App EngineIndicThreads
 
Enterprise Manager: Write powerful scripts with EMCLI
Enterprise Manager: Write powerful scripts with EMCLIEnterprise Manager: Write powerful scripts with EMCLI
Enterprise Manager: Write powerful scripts with EMCLIGokhan Atil
 
Indic threads pune12-java ee 7 platformsimplification html5
Indic threads pune12-java ee 7 platformsimplification html5Indic threads pune12-java ee 7 platformsimplification html5
Indic threads pune12-java ee 7 platformsimplification html5IndicThreads
 
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...탑크리에듀(구로디지털단지역3번출구 2분거리)
 
Jsp/Servlet
Jsp/ServletJsp/Servlet
Jsp/ServletSunil OS
 
#29.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#29.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...#29.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#29.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...탑크리에듀(구로디지털단지역3번출구 2분거리)
 
Short intro to scala and the play framework
Short intro to scala and the play frameworkShort intro to scala and the play framework
Short intro to scala and the play frameworkFelipe
 
Apache Aries Overview
Apache Aries   OverviewApache Aries   Overview
Apache Aries OverviewIan Robinson
 
Filling the flask
Filling the flaskFilling the flask
Filling the flaskJason Myers
 
#34.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자교육,국...
#34.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자교육,국...#34.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자교육,국...
#34.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자교육,국...탑크리에듀(구로디지털단지역3번출구 2분거리)
 
JBoss AS Upgrade
JBoss AS UpgradeJBoss AS Upgrade
JBoss AS Upgradesharmami
 
Introduction to Node.JS Express
Introduction to Node.JS ExpressIntroduction to Node.JS Express
Introduction to Node.JS ExpressEueung Mulyana
 
Oracle database - Get external data via HTTP, FTP and Web Services
Oracle database - Get external data via HTTP, FTP and Web ServicesOracle database - Get external data via HTTP, FTP and Web Services
Oracle database - Get external data via HTTP, FTP and Web ServicesKim Berg Hansen
 

What's hot (20)

Using Ruby on Rails with legacy Oracle databases
Using Ruby on Rails with legacy Oracle databasesUsing Ruby on Rails with legacy Oracle databases
Using Ruby on Rails with legacy Oracle databases
 
JavaCro'14 - Unit testing in AngularJS – Slaven Tomac
JavaCro'14 - Unit testing in AngularJS – Slaven TomacJavaCro'14 - Unit testing in AngularJS – Slaven Tomac
JavaCro'14 - Unit testing in AngularJS – Slaven Tomac
 
Resthub framework presentation
Resthub framework presentationResthub framework presentation
Resthub framework presentation
 
Fifty Features of Java EE 7 in 50 Minutes
Fifty Features of Java EE 7 in 50 MinutesFifty Features of Java EE 7 in 50 Minutes
Fifty Features of Java EE 7 in 50 Minutes
 
Resthub lyonjug
Resthub lyonjugResthub lyonjug
Resthub lyonjug
 
Testing Your Application On Google App Engine
Testing Your Application On Google App EngineTesting Your Application On Google App Engine
Testing Your Application On Google App Engine
 
Enterprise Manager: Write powerful scripts with EMCLI
Enterprise Manager: Write powerful scripts with EMCLIEnterprise Manager: Write powerful scripts with EMCLI
Enterprise Manager: Write powerful scripts with EMCLI
 
Indic threads pune12-java ee 7 platformsimplification html5
Indic threads pune12-java ee 7 platformsimplification html5Indic threads pune12-java ee 7 platformsimplification html5
Indic threads pune12-java ee 7 platformsimplification html5
 
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
#18.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원IT학원/실업자/재직자환급교육/자바/스프링/...
 
Jsp/Servlet
Jsp/ServletJsp/Servlet
Jsp/Servlet
 
#29.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#29.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...#29.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#29.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
 
Short intro to scala and the play framework
Short intro to scala and the play frameworkShort intro to scala and the play framework
Short intro to scala and the play framework
 
Apache Aries Overview
Apache Aries   OverviewApache Aries   Overview
Apache Aries Overview
 
Php with MYSQL Database
Php with MYSQL DatabasePhp with MYSQL Database
Php with MYSQL Database
 
Filling the flask
Filling the flaskFilling the flask
Filling the flask
 
#34.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자교육,국...
#34.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자교육,국...#34.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자교육,국...
#34.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자교육,국...
 
JBoss AS Upgrade
JBoss AS UpgradeJBoss AS Upgrade
JBoss AS Upgrade
 
Introduction to Node.JS Express
Introduction to Node.JS ExpressIntroduction to Node.JS Express
Introduction to Node.JS Express
 
Dropwizard
DropwizardDropwizard
Dropwizard
 
Oracle database - Get external data via HTTP, FTP and Web Services
Oracle database - Get external data via HTTP, FTP and Web ServicesOracle database - Get external data via HTTP, FTP and Web Services
Oracle database - Get external data via HTTP, FTP and Web Services
 

Viewers also liked

[Roblek] Distributed computing in practice
[Roblek] Distributed computing in practice[Roblek] Distributed computing in practice
[Roblek] Distributed computing in practicejavablend
 
[Muir] Seam 2 in practice
[Muir] Seam 2 in practice[Muir] Seam 2 in practice
[Muir] Seam 2 in practicejavablend
 
windows linux BEÑAT HAITZ
windows linux BEÑAT HAITZwindows linux BEÑAT HAITZ
windows linux BEÑAT HAITZguest5b2d8e
 
[Pilarczyk] Adrenaline programing implementing - SOA and BPM in your application
[Pilarczyk] Adrenaline programing implementing - SOA and BPM in your application[Pilarczyk] Adrenaline programing implementing - SOA and BPM in your application
[Pilarczyk] Adrenaline programing implementing - SOA and BPM in your applicationjavablend
 
Portfólio - Zarabatana Digital 360
Portfólio - Zarabatana Digital 360 Portfólio - Zarabatana Digital 360
Portfólio - Zarabatana Digital 360 Sergio Akash
 

Viewers also liked (7)

[Roblek] Distributed computing in practice
[Roblek] Distributed computing in practice[Roblek] Distributed computing in practice
[Roblek] Distributed computing in practice
 
Bryanpulido
BryanpulidoBryanpulido
Bryanpulido
 
.
..
.
 
[Muir] Seam 2 in practice
[Muir] Seam 2 in practice[Muir] Seam 2 in practice
[Muir] Seam 2 in practice
 
windows linux BEÑAT HAITZ
windows linux BEÑAT HAITZwindows linux BEÑAT HAITZ
windows linux BEÑAT HAITZ
 
[Pilarczyk] Adrenaline programing implementing - SOA and BPM in your application
[Pilarczyk] Adrenaline programing implementing - SOA and BPM in your application[Pilarczyk] Adrenaline programing implementing - SOA and BPM in your application
[Pilarczyk] Adrenaline programing implementing - SOA and BPM in your application
 
Portfólio - Zarabatana Digital 360
Portfólio - Zarabatana Digital 360 Portfólio - Zarabatana Digital 360
Portfólio - Zarabatana Digital 360
 

Similar to [Strukelj] Why will Java 7.0 be so cool

Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to javaciklum_ods
 
A few good JavaScript development tools
A few good JavaScript development toolsA few good JavaScript development tools
A few good JavaScript development toolsSimon Kim
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSGunnar Hillert
 
Using Stratego/XT for generation of software connectors.
Using Stratego/XT for generation of software connectors.Using Stratego/XT for generation of software connectors.
Using Stratego/XT for generation of software connectors.Michal Malohlava
 
Php Development With Eclipde PDT
Php Development With Eclipde PDTPhp Development With Eclipde PDT
Php Development With Eclipde PDTBastian Feder
 
Java 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevJava 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevMattias Karlsson
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...Fabio Franzini
 
Angular JS in 2017
Angular JS in 2017Angular JS in 2017
Angular JS in 2017Ayush Sharma
 
Building maintainable javascript applications
Building maintainable javascript applicationsBuilding maintainable javascript applications
Building maintainable javascript applicationsequisodie
 
How and why i roll my own node.js framework
How and why i roll my own node.js frameworkHow and why i roll my own node.js framework
How and why i roll my own node.js frameworkBen Lin
 
New Features Of JDK 7
New Features Of JDK 7New Features Of JDK 7
New Features Of JDK 7Deniz Oguz
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)Igor Bronovskyy
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLsintelliyole
 
Xopus Application Framework
Xopus Application FrameworkXopus Application Framework
Xopus Application FrameworkJady Yang
 
Scala Frustrations
Scala FrustrationsScala Frustrations
Scala Frustrationstakezoe
 

Similar to [Strukelj] Why will Java 7.0 be so cool (20)

Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to java
 
Os Haase
Os HaaseOs Haase
Os Haase
 
A few good JavaScript development tools
A few good JavaScript development toolsA few good JavaScript development tools
A few good JavaScript development tools
 
Java 7: Quo vadis?
Java 7: Quo vadis?Java 7: Quo vadis?
Java 7: Quo vadis?
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
 
Using Stratego/XT for generation of software connectors.
Using Stratego/XT for generation of software connectors.Using Stratego/XT for generation of software connectors.
Using Stratego/XT for generation of software connectors.
 
Php Development With Eclipde PDT
Php Development With Eclipde PDTPhp Development With Eclipde PDT
Php Development With Eclipde PDT
 
Java 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevJava 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from Oredev
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Java 7 & 8 New Features
Java 7 & 8 New FeaturesJava 7 & 8 New Features
Java 7 & 8 New Features
 
Angular JS in 2017
Angular JS in 2017Angular JS in 2017
Angular JS in 2017
 
Building maintainable javascript applications
Building maintainable javascript applicationsBuilding maintainable javascript applications
Building maintainable javascript applications
 
How and why i roll my own node.js framework
How and why i roll my own node.js frameworkHow and why i roll my own node.js framework
How and why i roll my own node.js framework
 
New Features Of JDK 7
New Features Of JDK 7New Features Of JDK 7
New Features Of JDK 7
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
 
Xopus Application Framework
Xopus Application FrameworkXopus Application Framework
Xopus Application Framework
 
Java platform
Java platformJava platform
Java platform
 
Play framework
Play frameworkPlay framework
Play framework
 
Scala Frustrations
Scala FrustrationsScala Frustrations
Scala Frustrations
 

Recently uploaded

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 

Recently uploaded (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

[Strukelj] Why will Java 7.0 be so cool

  • 1. WHAT’S COMING IN JAVA SE 7 MARKO ŠTRUKELJ PARSEK
  • 2. JAVA SE 7 • Feature set not specified yet • JSR not created yet • Many different API, library, and framework efforts aiming for inclusion • Early Access downloads available: – Java SE 7 EA – Open JDK • Release expected summer 2009 at the earliest
  • 3. FOCUS • Focus on (as claimed by Sun): – Multiple languages support – Modularity – Rich clients • Plus the usual: – API updates and language enhancements – Performance
  • 4. SOME LANGUAGE ENHANCEMENTS – Modules – Annotations extensions – Strings in switch statements – Closures – Try catch syntax improvement – Enum comparisons
  • 5. SOME API UPDATES • New I/O version 2 • JMX 2.0
  • 6. MODULE SYSTEM (JSR-277) • Introduce mandatory and consistent versioning and dependency meta info • Integrate versioned dependencies with classloading • Introduce new packaging system – JAM archives, and module repositories to store and serve the content of these archives. • Introduce a scope that’s less than public but more than package-private to improve hiding of non-api classes
  • 7. MODULE SCOPE - LESS THAN PUBLIC, MORE THAN PACKAGE PRIVATE :: com/company/util/ImageUtils.java ::com/company/util/impl/OSHacks.java package com.company.util; package com.company.util.impl; public class ImageUtils { public class OSHacks { ... OSHacks.callConvert(); public callConvert() {...} } }
  • 8. MODULE SCOPE - LESS THAN PUBLIC, MORE THAN PACKAGE PRIVATE :: com/company/util/ImageUtils.java ::com/company/util/impl/OSHacks.java module com.company.util; module com.company.util; package com.company.util; package com.company.util.impl; public class ImageUtils { module class OSHacks { ... OSHacks.callConvert(); module callConvert() {...} } } :: com/company/util/module-info.java @Version(“1.0”) @ImportModule(name=“java.se.core”, version=“1.7+”) @ExportResources({“schemas/**”}) module com.company.util;
  • 9. MODULE SYSTEM (JSR-277) • JAM file - like JAR but more stringent meta data requirements – Can contain jars, native libraries, resources ... – Module definition info and dependencies specified through annotations • Repositories implemented at API level – You can implement custom repositories and plug them into the module system.
  • 10. MODULE SYSTEM (JSR-277) – bootstrap repository (java.* classes) contains quot;java.sequot; module - implicitly imported – system-wide runtime repository (versioned global libraries) – user repository – application repository - on the fly at app startup - when application not installed in system repository
  • 11.
  • 12. ANNOTATIONS ON JAVA TYPES (JSR-308) • Catch more errors at compile time – You’ll be able to put annotation in more places – Type use: • List<@NonNull String> keys; – @NonNull, @Interned, @Readonly, @Immutable
  • 13. LANGUAGE ENHANCEMENTS - IMPROVED TRY-CATCH Motivation: prevent code repetition try { ... someCall(); } catch(IllegalArgumentException, IOException e) { log.warn(“We expected that, moving on ...: ”, e); } catch(Exception e) { log.error(); throw e; }
  • 14. LANGUAGE ENHANCEMENTS – SAFE RETHROW Motivation: prevent code repetition public void test() throws E1, E2 { try { ... someCall(); } catch(final Throwable ex) { log.error(“error: “, ex); throw ex; } }
  • 15. LANGUAGE ENHANCEMENTS – ENUM COMPARISON Motivation: improve usability and readability enum Size {SMALL, MEDIUM, LARGE}; Size mySize, yourSize; ... if (mySize < yourSize) { ... }
  • 16. LANGUAGE ENHANCEMENTS – STRINGS IN SWITCH STATEMENTS Motivation: improve usability and readability switch(val) { case “true”: case “yes”: return true; case “false”: return false; default: throw new IllegalArgumentException(“Wrong value: ” + val); }
  • 17. LANGUAGE ENHANCEMENTS - JBBA CLOSURES PROPOSAL • What are closures? Thread t = new Thread(new Runnable() { public void run() { doSomething(); } });
  • 18. LANGUAGE ENHANCEMENTS - CLOSURES • Couldn’t we have something like Thread t = new Thread({ => doSomething(); }); • Motivation: reduce boilerplate
  • 19. LANGUAGE ENHANCEMENTS - CLOSURES Connection con = ds.getConnection(); con.use({ => ps = con.prepareStatement(...); ... }); // connection will automatically be closed • Motivation: automatic resource cleanup, remove a whole class of errors – i.e. make connection leak impossible
  • 20. LANGUAGE ENHANCEMENTS - CLOSURES Double highestGpa = students .withFilter( { Student s => (s.graduation == THIS_YEAR)} ) .withMapping( { Student s => s.gpa } ) .max(); • Motivation: express a data processing algorithm in clean and short form that is parallelism- agnostic
  • 21. API UPDATES – NEW I/O 2 (JSR-203) – copying, moving files – symbolic links support – file change notification (watch service) – file attributes – efficient file tree walking – path name manipulation – pluggable FileSystem providers
  • 22. API UPDATES – NEW I/O 2 (JSR-203) Path home = Path.get(quot;/home/user1quot;); Path profile = home.resolve(quot;.profilequot;); profile.copyTo(home.resolve(quot;.profile.bakquot;), REPLACE_EXISTING, COPY_ATTRIBUTES);
  • 23. API UPDATES – NEW I/O 2 (JSR-203) – java.nio.file – java.nio.file.attribute – interoperability with java.io File srcFile = new File(“/home/user1/file.txt”); File destFile = new File(“/home/user1/file2.txt”); srcFile.getFileRef().copyTo(destFile.getFileRef());
  • 24. API UPDATES – JMX 2.0 • Use annotations to turn POJOs into MBeans. (JSR-255) • There is also a new standard to access management services remotely through web services - interoperable with .NET (JSR-262)
  • 25. NEW APIS • New Date and Time API (JSR-310) (implemented in Joda-Time library)
  • 26. FORK-JOIN CONCURRENCY API (JSR-166) Fine-grained parallel computation framework based on divide-and-conquer and work-stealing Double highestGpa = students .withFilter( { Student s => (s.graduation == THIS_YEAR)} ) .withMapping( { Student s => s.gpa } ) .max();
  • 27. BEANS VALIDATION FRAMEWORK (JSR-303) Constraints via annotations (like in Hibernate Validator) – @NotNull, @NotEmpty – @Min(value=), @Max(value=) – @Length(min=, max=), @Range(min=,max=) – @Past/@Future, @Email
  • 28. SOME OTHER STUFF – NEW GARBAGE COLLECTOR • Garbage first (G1) garbage collector – Parallel, concurrent – makes good use of multiple native threads (fast) – Generational – segments the heap and gives different attention to different segments (fast) – High throughput (fast) – Compacting – efficient memory use – but takes most of GC processing time (slow)
  • 29. SOME OTHER STUFF – JAVA FX • A new scripting language and a whole set of APIs for building rich GUIs – Motivation: finally make UI development easy for GUI, multimedia applications, vector graphics, animation, rich internet applications ... Compete with AIR and Silverlight – JavaFX Script – Swing enhancements (JWebPane ... ) – Java Media Components