SlideShare una empresa de Scribd logo
1 de 32
Descargar para leer sin conexión
Taste of new in
Java 9
Arkadiusz Sokołowski
2015
Agenda
● A bit of history
● jshell
● JDK Benchmarks / jmh
● small stuff...
● jigsaw
● what’s beyond 9?
Bit of history
1991: Green (Oak)
1994: JDK EAs
Jan 1996: JDK 1.0
Feb 1997: JDK 1.1
Dec 1998: J2SE 1.2
May 2000: J2SE 1.3
Feb 2002: J2SE 1.4
Sep 2004: J2SE 5.0
Dec 2006: Java SE 6
Jul 2011: Java SE 7
Mar 2014: Java SE 8
Sep 2016: Java SE 9
release
Dec 2015: Java SE 9
feature complete
New versioning scheme
● Current scheme:
○ Minor releases containing changes beyond security
fixes are multiples of 20
○ Security releases based on the previous minor
release are odd numbers incremented by five, or by
six if necessary in order to keep the update number
odd
New versioning scheme
● New scheme:
○ MAJOR.MINOR.SECURITY
○ 1.8.0 => 8.0.0
○ 1.8.0_05 => 8.0.1
○ 1.8.0_11 => 8.0.2
○ 1.8.0_20 => 8.1.2
○ 1.8.0_25 => 8.1.3
jshell
JDK Benchmark Suite
● based on JMH
● stable, tuned benchmarks
● targeted for continuous performance check
● lot of benchmarks for standard libraries
● comparison with JDK 8
Http/2
HttpResponse response = HttpRequest
.create(new URI("http://www.ocado.com"))
.body(noBody())
.GET().send();
int responseCode = response.responseCode();
String responseBody = response.body(asString());
System.out.println(responseBody);
Http/2
HttpRequest req = HttpRequest
.create(new URI("http://www.ocado.com"))
.body(noBody())
.GET();
CompletableFuture<HttpResponse> asyncResp = req.sendAsync();
Thread.sleep(10);
if (!asyncResp.isDone()) {
asyncResp.cancel(true);
System.err.println("timeout");
return;
}
HttpResponse response = asyncResp.get();
Unified JVM logging
● usage: -Xlog[:option]
● tags (GC, HTTP, security, …)
● levels (error, warning, info, debug, trace)
● decorators (time, uptime, pid, tid, level, tag)
● output (can be rotated file!)
● -Xlog:gc=debug:file=gc.txt:uptime,level
Coin project - language adjustments
● allow @SaveVargs on private instance methods
● allow effectively-final variables in try-with-resources
● more type inference with generics
● underscore will be no more a valid identifier
● private methods in interfaces
Hotspot / JDK diagnostics
● print_class_summary
● print_codegen_list
● print_utf8pool
● dump_codelist
● print_codeblocks
● set_vmflags
Other...
● improved contented locking
● variable handles (Unsafe!)
● sjavac
● fixed imports processing by javac
● Security (Datagram / Application transport layer)
● HTML5 javadoc
● Unicode 8.0
Other...
● String internal representation altered
● Java-Level JVM Compiler Interface
● Parser API for Nashorn
● Support for AArch64 (ARMv8) architecture
● Compile for Older Platform Versions
● G1 will be default garbage collector
● Store Interned Strings in CDS archives
Jigsaw - modules for Java
● Motivation:
○ JAR/classpath hell reduction
○ manual dependencies management
○ unexpressed/transitive dependencies
○ hide some (private) packages; com.sun.misc.*
○ system instead of manual security
○ JRE size reduction
Copyright © Oracle 2015
Jigsaw - modules in Java8
Copyright © Oracle 2015
Jigsaw - piece of action...
Jigsaw - one more example
module com.foo.app {
requires com.foo.bar;
requires java.sql;
}
module java.sql {
requires java.logging;
requires java.xml;
exports java.sql;
exports javax.sql;
exports javax.transaction.xa;
}
Jigsaw - one more example
Copyright © Oracle 2015
Jigsaw - implied readability
String url = ...;
Properties props = ...;
Driver d = DriverManager.getDriver(url);
Connection c = d.connect(url, props);
d.getParentLogger().info("Connection acquired");
Jigsaw - implied readability
module java.sql {
requires public java.logging;
requires public java.xml;
exports java.sql;
exports javax.sql;
exports javax.transaction.xa;
}
Jigsaw - implied readability
Copyright © Oracle 2015
Jigsaw - services
module com.mysql.jdbc {
requires java.sql;
requires org.slf4j;
exports com.mysql.jdbc;
}
Jigsaw - services
module java.sql {
requires public java.logging;
requires public java.xml;
exports java.sql;
exports javax.sql;
exports javax.transaction.xa;
uses java.sql.Driver;
}
Jigsaw - services
module com.mysql.jdbc {
requires java.sql;
requires org.slf4j;
exports com.mysql.jdbc;
provides java.sql.Driver with com.mysql.jdbc.Driver;
}
Jigsaw - services
Copyright © Oracle 2015
Jigsaw - qualified exports
module java.base {
...
exports sun.reflect to
java.corba,
java.logging,
java.sql,
java.sql.rowset,
jdk.scripting.nashorn;
}
Jigsaw - qualified exports
Copyright © Oracle 2015
Java 10: value classes
value class Point {
int x;
int y;
Point(int x, int y) {
this.x = x;
this.y = y;
}
}
Java 10: generics
● Reified Generics
● Generics with values
List<int> intList = new ArrayList<>();
…
int val = intList.get(0);
List<Point>... List$Point,
Thank you!
...questions?

Más contenido relacionado

Destacado

JDD2015: Panta rhei or Reactive Java in practice - Tomasz Kowalczewski
JDD2015: Panta rhei or Reactive Java in practice - Tomasz KowalczewskiJDD2015: Panta rhei or Reactive Java in practice - Tomasz Kowalczewski
JDD2015: Panta rhei or Reactive Java in practice - Tomasz KowalczewskiPROIDEA
 
JDD2015: Trudne Rozmowy [WORKSHOP] - Mariusz Sieraczkiewicz
JDD2015: Trudne Rozmowy [WORKSHOP] - Mariusz SieraczkiewiczJDD2015: Trudne Rozmowy [WORKSHOP] - Mariusz Sieraczkiewicz
JDD2015: Trudne Rozmowy [WORKSHOP] - Mariusz SieraczkiewiczPROIDEA
 
JDD2015: Make your world event driven - Krzysztof Dębski
JDD2015: Make your world event driven - Krzysztof DębskiJDD2015: Make your world event driven - Krzysztof Dębski
JDD2015: Make your world event driven - Krzysztof DębskiPROIDEA
 
JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...
JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...
JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...PROIDEA
 
JDD 2015: Artificial intelligence. Status report. - Tomasz Jackowiak
JDD 2015: Artificial intelligence. Status report. - Tomasz Jackowiak JDD 2015: Artificial intelligence. Status report. - Tomasz Jackowiak
JDD 2015: Artificial intelligence. Status report. - Tomasz Jackowiak PROIDEA
 
JDD2015: -XX:+UseG1GC - Jakub Kubryński
JDD2015: -XX:+UseG1GC - Jakub KubryńskiJDD2015: -XX:+UseG1GC - Jakub Kubryński
JDD2015: -XX:+UseG1GC - Jakub KubryńskiPROIDEA
 

Destacado (6)

JDD2015: Panta rhei or Reactive Java in practice - Tomasz Kowalczewski
JDD2015: Panta rhei or Reactive Java in practice - Tomasz KowalczewskiJDD2015: Panta rhei or Reactive Java in practice - Tomasz Kowalczewski
JDD2015: Panta rhei or Reactive Java in practice - Tomasz Kowalczewski
 
JDD2015: Trudne Rozmowy [WORKSHOP] - Mariusz Sieraczkiewicz
JDD2015: Trudne Rozmowy [WORKSHOP] - Mariusz SieraczkiewiczJDD2015: Trudne Rozmowy [WORKSHOP] - Mariusz Sieraczkiewicz
JDD2015: Trudne Rozmowy [WORKSHOP] - Mariusz Sieraczkiewicz
 
JDD2015: Make your world event driven - Krzysztof Dębski
JDD2015: Make your world event driven - Krzysztof DębskiJDD2015: Make your world event driven - Krzysztof Dębski
JDD2015: Make your world event driven - Krzysztof Dębski
 
JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...
JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...
JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...
 
JDD 2015: Artificial intelligence. Status report. - Tomasz Jackowiak
JDD 2015: Artificial intelligence. Status report. - Tomasz Jackowiak JDD 2015: Artificial intelligence. Status report. - Tomasz Jackowiak
JDD 2015: Artificial intelligence. Status report. - Tomasz Jackowiak
 
JDD2015: -XX:+UseG1GC - Jakub Kubryński
JDD2015: -XX:+UseG1GC - Jakub KubryńskiJDD2015: -XX:+UseG1GC - Jakub Kubryński
JDD2015: -XX:+UseG1GC - Jakub Kubryński
 

Similar a JDD2015: Taste of new in Java 9 - Arkadiusz Sokołowski

Java 9-10 What's New
Java 9-10 What's NewJava 9-10 What's New
Java 9-10 What's NewNicola Pedot
 
Prepare for JDK 9
Prepare for JDK 9Prepare for JDK 9
Prepare for JDK 9haochenglee
 
QConSP 2018 - Java Module System
QConSP 2018 - Java Module SystemQConSP 2018 - Java Module System
QConSP 2018 - Java Module SystemLeonardo Zanivan
 
Java and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystemJava and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystemRafael Winterhalter
 
Jozi-JUG JDK 9 Unconference
Jozi-JUG JDK 9 UnconferenceJozi-JUG JDK 9 Unconference
Jozi-JUG JDK 9 UnconferenceHeather VanCura
 
Jigsaw - Javaforum 2015Q4
Jigsaw - Javaforum 2015Q4Jigsaw - Javaforum 2015Q4
Jigsaw - Javaforum 2015Q4Rikard Thulin
 
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"GlobalLogic Ukraine
 
Whats new in Java 9,10,11,12
Whats new in Java 9,10,11,12Whats new in Java 9,10,11,12
Whats new in Java 9,10,11,12Rory Preddy
 
Kaunas JUG#1: Java History and Trends (Dainius Mezanskas)
Kaunas JUG#1: Java History and Trends (Dainius Mezanskas)Kaunas JUG#1: Java History and Trends (Dainius Mezanskas)
Kaunas JUG#1: Java History and Trends (Dainius Mezanskas)Kaunas Java User Group
 
JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]
JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]
JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]Leonardo Zanivan
 
Java 9 - Part1: New Features (Not Jigsaw Modules)
Java 9 - Part1: New Features (Not Jigsaw Modules)Java 9 - Part1: New Features (Not Jigsaw Modules)
Java 9 - Part1: New Features (Not Jigsaw Modules)Simone Bordet
 
Gustavo Garnica: Evolución de la Plataforma Java y lo que Significa para Ti
Gustavo Garnica: Evolución de la Plataforma Java y lo que Significa para TiGustavo Garnica: Evolución de la Plataforma Java y lo que Significa para Ti
Gustavo Garnica: Evolución de la Plataforma Java y lo que Significa para TiSoftware Guru
 
A Journey through the JDKs (Java 9 to Java 11)
A Journey through the JDKs (Java 9 to Java 11)A Journey through the JDKs (Java 9 to Java 11)
A Journey through the JDKs (Java 9 to Java 11)Markus Günther
 
Nw installation
Nw installationNw installation
Nw installationdkeerthan
 
Java 9/10/11 - What's new and why you should upgrade
Java 9/10/11 - What's new and why you should upgradeJava 9/10/11 - What's new and why you should upgrade
Java 9/10/11 - What's new and why you should upgradeSimone Bordet
 
Java 7 and 8, what does it mean for you
Java 7 and 8, what does it mean for youJava 7 and 8, what does it mean for you
Java 7 and 8, what does it mean for youDmitry Buzdin
 

Similar a JDD2015: Taste of new in Java 9 - Arkadiusz Sokołowski (20)

Java 9-10 What's New
Java 9-10 What's NewJava 9-10 What's New
Java 9-10 What's New
 
Prepare for JDK 9
Prepare for JDK 9Prepare for JDK 9
Prepare for JDK 9
 
Java 9 and Project Jigsaw
Java 9 and Project JigsawJava 9 and Project Jigsaw
Java 9 and Project Jigsaw
 
QConSP 2018 - Java Module System
QConSP 2018 - Java Module SystemQConSP 2018 - Java Module System
QConSP 2018 - Java Module System
 
Java and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystemJava and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystem
 
Jozi-JUG JDK 9 Unconference
Jozi-JUG JDK 9 UnconferenceJozi-JUG JDK 9 Unconference
Jozi-JUG JDK 9 Unconference
 
Jigsaw - Javaforum 2015Q4
Jigsaw - Javaforum 2015Q4Jigsaw - Javaforum 2015Q4
Jigsaw - Javaforum 2015Q4
 
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
 
Whats new in Java 9,10,11,12
Whats new in Java 9,10,11,12Whats new in Java 9,10,11,12
Whats new in Java 9,10,11,12
 
Kaunas JUG#1: Java History and Trends (Dainius Mezanskas)
Kaunas JUG#1: Java History and Trends (Dainius Mezanskas)Kaunas JUG#1: Java History and Trends (Dainius Mezanskas)
Kaunas JUG#1: Java History and Trends (Dainius Mezanskas)
 
Java History and Trends
Java History and TrendsJava History and Trends
Java History and Trends
 
JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]
JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]
JavaOne 2014 - Scalable JavaScript Applications with Project Nashorn [CON6423]
 
Java Programming - 01 intro to java
Java Programming - 01 intro to javaJava Programming - 01 intro to java
Java Programming - 01 intro to java
 
Java 9 - Part1: New Features (Not Jigsaw Modules)
Java 9 - Part1: New Features (Not Jigsaw Modules)Java 9 - Part1: New Features (Not Jigsaw Modules)
Java 9 - Part1: New Features (Not Jigsaw Modules)
 
Gustavo Garnica: Evolución de la Plataforma Java y lo que Significa para Ti
Gustavo Garnica: Evolución de la Plataforma Java y lo que Significa para TiGustavo Garnica: Evolución de la Plataforma Java y lo que Significa para Ti
Gustavo Garnica: Evolución de la Plataforma Java y lo que Significa para Ti
 
A Journey through the JDKs (Java 9 to Java 11)
A Journey through the JDKs (Java 9 to Java 11)A Journey through the JDKs (Java 9 to Java 11)
A Journey through the JDKs (Java 9 to Java 11)
 
Nw installation
Nw installationNw installation
Nw installation
 
Java 9/10/11 - What's new and why you should upgrade
Java 9/10/11 - What's new and why you should upgradeJava 9/10/11 - What's new and why you should upgrade
Java 9/10/11 - What's new and why you should upgrade
 
Java 7 and 8, what does it mean for you
Java 7 and 8, what does it mean for youJava 7 and 8, what does it mean for you
Java 7 and 8, what does it mean for you
 
Java modules using project jigsaw@jdk 9
Java modules using project jigsaw@jdk 9Java modules using project jigsaw@jdk 9
Java modules using project jigsaw@jdk 9
 

Último

%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburgmasabamasaba
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benonimasabamasaba
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 

Último (20)

%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 

JDD2015: Taste of new in Java 9 - Arkadiusz Sokołowski

  • 1. Taste of new in Java 9 Arkadiusz Sokołowski 2015
  • 2. Agenda ● A bit of history ● jshell ● JDK Benchmarks / jmh ● small stuff... ● jigsaw ● what’s beyond 9?
  • 3. Bit of history 1991: Green (Oak) 1994: JDK EAs Jan 1996: JDK 1.0 Feb 1997: JDK 1.1 Dec 1998: J2SE 1.2 May 2000: J2SE 1.3 Feb 2002: J2SE 1.4 Sep 2004: J2SE 5.0 Dec 2006: Java SE 6 Jul 2011: Java SE 7 Mar 2014: Java SE 8 Sep 2016: Java SE 9 release Dec 2015: Java SE 9 feature complete
  • 4. New versioning scheme ● Current scheme: ○ Minor releases containing changes beyond security fixes are multiples of 20 ○ Security releases based on the previous minor release are odd numbers incremented by five, or by six if necessary in order to keep the update number odd
  • 5. New versioning scheme ● New scheme: ○ MAJOR.MINOR.SECURITY ○ 1.8.0 => 8.0.0 ○ 1.8.0_05 => 8.0.1 ○ 1.8.0_11 => 8.0.2 ○ 1.8.0_20 => 8.1.2 ○ 1.8.0_25 => 8.1.3
  • 7. JDK Benchmark Suite ● based on JMH ● stable, tuned benchmarks ● targeted for continuous performance check ● lot of benchmarks for standard libraries ● comparison with JDK 8
  • 8. Http/2 HttpResponse response = HttpRequest .create(new URI("http://www.ocado.com")) .body(noBody()) .GET().send(); int responseCode = response.responseCode(); String responseBody = response.body(asString()); System.out.println(responseBody);
  • 9. Http/2 HttpRequest req = HttpRequest .create(new URI("http://www.ocado.com")) .body(noBody()) .GET(); CompletableFuture<HttpResponse> asyncResp = req.sendAsync(); Thread.sleep(10); if (!asyncResp.isDone()) { asyncResp.cancel(true); System.err.println("timeout"); return; } HttpResponse response = asyncResp.get();
  • 10. Unified JVM logging ● usage: -Xlog[:option] ● tags (GC, HTTP, security, …) ● levels (error, warning, info, debug, trace) ● decorators (time, uptime, pid, tid, level, tag) ● output (can be rotated file!) ● -Xlog:gc=debug:file=gc.txt:uptime,level
  • 11. Coin project - language adjustments ● allow @SaveVargs on private instance methods ● allow effectively-final variables in try-with-resources ● more type inference with generics ● underscore will be no more a valid identifier ● private methods in interfaces
  • 12. Hotspot / JDK diagnostics ● print_class_summary ● print_codegen_list ● print_utf8pool ● dump_codelist ● print_codeblocks ● set_vmflags
  • 13. Other... ● improved contented locking ● variable handles (Unsafe!) ● sjavac ● fixed imports processing by javac ● Security (Datagram / Application transport layer) ● HTML5 javadoc ● Unicode 8.0
  • 14. Other... ● String internal representation altered ● Java-Level JVM Compiler Interface ● Parser API for Nashorn ● Support for AArch64 (ARMv8) architecture ● Compile for Older Platform Versions ● G1 will be default garbage collector ● Store Interned Strings in CDS archives
  • 15. Jigsaw - modules for Java ● Motivation: ○ JAR/classpath hell reduction ○ manual dependencies management ○ unexpressed/transitive dependencies ○ hide some (private) packages; com.sun.misc.* ○ system instead of manual security ○ JRE size reduction
  • 17. Jigsaw - modules in Java8 Copyright © Oracle 2015
  • 18. Jigsaw - piece of action...
  • 19. Jigsaw - one more example module com.foo.app { requires com.foo.bar; requires java.sql; } module java.sql { requires java.logging; requires java.xml; exports java.sql; exports javax.sql; exports javax.transaction.xa; }
  • 20. Jigsaw - one more example Copyright © Oracle 2015
  • 21. Jigsaw - implied readability String url = ...; Properties props = ...; Driver d = DriverManager.getDriver(url); Connection c = d.connect(url, props); d.getParentLogger().info("Connection acquired");
  • 22. Jigsaw - implied readability module java.sql { requires public java.logging; requires public java.xml; exports java.sql; exports javax.sql; exports javax.transaction.xa; }
  • 23. Jigsaw - implied readability Copyright © Oracle 2015
  • 24. Jigsaw - services module com.mysql.jdbc { requires java.sql; requires org.slf4j; exports com.mysql.jdbc; }
  • 25. Jigsaw - services module java.sql { requires public java.logging; requires public java.xml; exports java.sql; exports javax.sql; exports javax.transaction.xa; uses java.sql.Driver; }
  • 26. Jigsaw - services module com.mysql.jdbc { requires java.sql; requires org.slf4j; exports com.mysql.jdbc; provides java.sql.Driver with com.mysql.jdbc.Driver; }
  • 27. Jigsaw - services Copyright © Oracle 2015
  • 28. Jigsaw - qualified exports module java.base { ... exports sun.reflect to java.corba, java.logging, java.sql, java.sql.rowset, jdk.scripting.nashorn; }
  • 29. Jigsaw - qualified exports Copyright © Oracle 2015
  • 30. Java 10: value classes value class Point { int x; int y; Point(int x, int y) { this.x = x; this.y = y; } }
  • 31. Java 10: generics ● Reified Generics ● Generics with values List<int> intList = new ArrayList<>(); … int val = intList.get(0); List<Point>... List$Point,