SlideShare a Scribd company logo
What’s New in Java 8?
John Clingan
Oracle
Product Manager – Java EE, GlassFish,
EclipseLink, Avatar
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.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.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.3 3
Lambda (JSR 335)
Date/Time API (JSR 310)
Type Annotations (JSR 308)
Compact Profiles
Lambda-Form Representation for Method Handles
Remove the Permanent Generation
Improve Contended Locking
Generalized Target-Type Inference
DocTree API
Parallel Array SortingBulk Data Operations
Unicode 6.2
Base64
Prepare for Modularization
Parameter Names
TLS Server Name Indication
Configurable Secure-Random Number Generation
Java SE 8
Nashorn
Enhanced Verification Errors
Fence Intrinsics
Repeating Annotations
HTTP URL Permissions
Limited doPrivileged
http://openjdk.java.net/projects/jdk8/features
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.4
Java SE 8:
Enhancing The Core Java
Platform
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.5
Java SE 8
!  Biggest change in the Java language since Java SE 5
!  Significant enhancements to the class libraries
!  The main goal of these changes are …
–  Better developer productivity
–  More reliable code
–  Better utilization of multi-core / multi-processor systems
!  Code is no longer inherently serial or parallel
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.6
Lambda Expressions
!  Almost all machines now are multi-core, multi-processor, or both
!  We need to make it simpler to write multi-threaded Java code
–  Java has always had the concept of threads
–  Even using the concurrency utilities and fork-join framework this is hard
!  Let’s add better library code
–  This is good, but sometimes we need to change the language too
!  The answer: Lambda expressions and the streams API
!  Backwards compatible with existing APIs like Collections.
Why Do We Need Them?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.7
Lambda & Streams Demos
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.8
Stream Sources
!  From collections and arrays
–  Collection.stream()
–  Collection.parallelStream()
–  Arrays.stream(T array) or Stream.of()
!  Static factories
–  IntStream.range()
–  Files.walk()
!  Roll your own
–  java.util.Spliterator()
Many Ways To Create
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.9
Stream Sources
!  Access to stream elements
!  Decomposition (for parallel operations)
–  Fork-join framework
!  Stream characteristics
–  ORDERED
–  DISTINCT
–  SORTED
–  SIZED
–  SUBSIZED
–  NONNULL
–  IMMUTABLE
–  CONCURRENT
Manage Three Aspects
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.10
Optional<T>
!  Used in new Java 8 APIs to replace null
!  Indicates that reference may, or may not have a value
!  Makes developer responsible for checking
Reducing NullPointerException Occurences
Optional<GPSData> maybeGPS = Optional.of(gpsData);
maybeGPS = Optional.ofNullable(gpsData);
maybeGPS.ifPresent(GPSData::printPosition);
GPSData gps = maybeGPS.orElse(new GPSData());
maybeGPS.filter(g -> g.lastRead() < 2).ifPresent(GPSData.display());
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.11
java.util.function Package
!  Predicate<T>
–  Determine if the input of type T matches some criteria
!  Consumer<T>
–  Accept a single input argumentof type T, and return no result
!  Function<T, R>
–  Apply a function to the input type T, generating a result of type R
!  Plus several more
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.12
Annotations On Java Types
!  Annotations can currently only be used on type declarations
–  Classes, methods, variable definitions
!  Extension for places where types are used
–  e.g. parameters
!  Permits error detection by pluggable type checkers
–  e.g. null pointer errors, race conditions, etc
public void process(@notnull List data) {…}
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.13
Concurrency Updates
!  Scalable update variables
–  DoubleAccumulator, DoubleAdder, etc
–  Multiple variables avoid update contention
–  Good for frequent updates, infrequent reads
!  ConcurrentHashMap updates
–  Improved scanning support, key computation
!  ForkJoinPool improvements
–  Completion based design for IO bound applications
–  Thread that is blocked hands work to thread that is running
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.14
Parallel Array Sorting
!  Additional utility methods in java.util.Arrays
–  parallelSort (multiple signatures for different primitives)
!  Anticipated minimum improvement of 30% over sequential sort
–  For dual core system with appropriate sized data set
!  Built on top of the fork-join framework
–  Uses Doug Lea’s ParallelArray implementation
–  Requires working space the same size as the array being sorted
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.15
Date And Time APIs
!  A new date, time, and calendar API for the Java SE platform
!  Supports standard time concepts
–  Partial, duration, period, intervals
–  date, time, instant, and time-zone
!  Provides a limited set of calendar systems and be extensible to others
!  Uses relevant standards, including ISO-8601, CLDR, and BCP47
!  Based on an explicit time-scale with a connection to UTC
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.16
Base64 Encoding and Decoding
!  Currently developers are forced to use non-public APIs
–  sun.misc.BASE64Encoder
–  sun.misc.BASE64Decoder
!  Java SE 8 now has a standard way
–  java.util.Base64.Encoder
–  java.util.Base64.Decoder
–  encode, encodeToString, decode, wrap methods
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.17
Nashorn JavaScript Engine
!  Lightweight, high-performance JavaScript engine
–  Integrated into JRE
!  Use existing javax.script API
!  ECMAScript-262 Edition 5.1 language specification compliance
!  New command-line tool, jjs to run JavaScript
!  Internationalised error messages and documentation
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.18
Native Memory Usage
!  No more tuning PermGen
–  PermGen – Artificial memory limitation
–  Metaspace – Regular native allocation
!  Limited only by process address space
!  Can force a limit: -XX:MaxMetaspaceSize=<size>
–  Part of the HotSpot, JRockit convergence
!  Class data sharing across processes – Experimental feature
–  Available on all platforms, -Xshare:[off|on|auto]
–  Reduce footprint and startup sharing JDK classes between processes
No more “java.lang.OutOfMemoryError: PermGen space”
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.19
Multistep Optimization
!  Interpreter " Client Compiler " Server Compiler
–  Fast initial compilation
–  Keep peak performance
–  Enabled by default
!  Improve time to performance
–  Startup of large applications
–  Performance for short running applications
Tiered Compilation
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.20
Java EE Application Deployment
Tiered Compilation
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.21
JSR 292 - InvokeDynamic
!  Complete rewrite of the VM support for JSR 292
–  Improved stability, maintainability and performance
!  Lambda
–  Avoid repeated calculations during capture
–  No allocation for non-capturing Lambdas
–  On par or faster than inner classes
!  JavaScript Engine – Nashorn
–  Incremental inlining of MethodHandle invocations
Major Updates
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.22
JavaScript Engine - Nashorn
JSR 292 - InvokeDynamic
JDK 8 updates double performance of a couple of these
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.23
Java Mission Control
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.24
JavaFX 8
New Stylesheet
24
Caspian vs Modena
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.25
JavaFX 8
!  Customisable
–  Configurable key combinations to exit full screen mode
–  Ability to prevent user exiting full screen mode
Improvements To Full Screen Mode
// Set the key combination that the user can use to exit
stage.setFullScreenExitKeyCombination(KeyCombination.NO_MATCH);
// Setup the click handler so we can escape from full screen
Rectangle r = new Rectangle(0, 0, 250, 250);
r.setOnMouseClicked(e -> stage.setFullScreen(false));
// Set full screen again
stage.setFullScreen(true);
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.26
JavaFX 8
!  New API for printing
–  Currently only supported on desktop
!  Any node can be printed
Printing Support
PrinterJob job = PrinterJob.createPrinterJob(printer);
job.getJobSettings().setPageLayout(pageLayout);
job.getJobSettings().setPrintQuality(PrintQuality.HIGH);
job.getJobSettings().setPaperSource(PaperSource.MANUAL);
job.getJobSettings().setCollation(Collation.COLLATED);
if (job.printPage(someRichText))
job.endJob();
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.27
JavaFX 8
!  DatePicker
!  TreeTableView
New Controls
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.28
JavaFX 8
!  Gestures
–  Swipe
–  Scroll
–  Rotate
–  Zoom
!  Touch events and touch points
Touch Support
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.29
JavaFX 8
!  Predefined shapes
–  Box
–  Cylinder
–  Sphere
!  User-defined shapes
–  TriangleMesh, MeshView
!  PhongMaterial
!  Lighting
!  Cameras
3D Support
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.30
Compact Profiles
Approximate static footprint goals
Compact1 Profile
Compact2 Profile
Compact3 Profile
Full JRE 54Mb
30Mb
16Mb
11Mb
[Migration path for CDC,
logging and SSL]
[Adds XML, JDBC, RMI]
[Adds mgmt, naming, more
security, compiler support]
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.31
Java SE Public Updates Schedule
GA Date
Notification of
End of Public Updates
End of Public Updates
Java SE 1.4.2 Feb 2002 Dec 2006 Oct 2008
Java SE 5 May 2004 Apr 2008 Oct 2009
Java SE 6 Dec 2006 Feb 2011 Feb 2013
Java SE 7 July 2011 Mar 2014 April 2015
Java SE 8 Mar 2014 Mar 2016* TBD
For details see, http://www.oracle.com/technetwork/java/eol-135779.html
* Or later. Exact date TBD.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.32
Books
!  “Java SE 8 for the Really Impatient” (Horstmann)
!  “Functional Programming in Java: Harnessing the Power of Java 8
Lambda Expressions” (Subramaniam)
!  “Mastering Lambdas: Java Programming in a Multicore World” (Naftalin)
!  “Java 8 in Action: Lambdas, Streams, and functional-style
programming” (Urma, Fusco, Mycroft)
!  “Java 8 Lambdas: Pragmatic Functional Programming” (Warburton)
!  “Java in a Nutshell” (Evans, Flanagan)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.33
Where Next?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.34
Java 9 And Beyond
!  Modularisation of the Java platform
–  Project Jigsaw
!  Foreign function interface
–  Like JNA
!  Enhanced volatiles
Java Never Stops
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.35
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.37
Java SE Lifetime Support Policy
GA Date Premier Support Extended Support
Java SE 1.4.2 Feb 2002 Feb 2010 Feb 2013
Java SE 5 May 2004 May 2011 May 2015
Java SE 6 Dec 2006 Dec 2015 Jun 2018
Java SE 7 July 2011 July 2019 July 2022
Java SE 8 Mar 2014 Mar 2022 Mar 2025
For details see, http://www.oracle.com/support/library/brochure/lifetime-support-middleware.pdf
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.38
Java SE Platform enhanced with enterprise-grade features for
monitoring, manageability, and analytics.
# 24x7 support, offered in 27 local languages
# Security updates on older and current releases
# Only source for Java SE 6 updates after Feb 2013
# Monitor, manage, and profile Java desktop applications
# Enterprise JRE features i.e., Java SE usage tracking
Java SE Commercial Products
Java SE Suite
Java SE Platform hardened for mission
critical applications having extreme and
predictable computing needs.
# Soft real-time deterministic garbage collector for
mission critical applications
# Memory leak server for dynamic memory leak
detection on mission critical production systems
Java SE Support
Oracle Premier Support for Java SE.
# 24x7 support, offered in 27 local languages
# Security updates on older and current releases
# Only source for Java SE 6 updates after Feb 2013
# Enterprise JRE features i.e., update control
Java SE Advanced Desktop and Java SE Advanced

More Related Content

What's hot

Java compilation
Java compilationJava compilation
Java compilationMike Kucera
 
Core java introduction
Core java introductionCore java introduction
Core java introduction
Beenu Gautam
 
JAX-RS 2.0: What’s New in JSR 339 ?
JAX-RS 2.0: What’s New in JSR 339 ?JAX-RS 2.0: What’s New in JSR 339 ?
JAX-RS 2.0: What’s New in JSR 339 ?
Arun Gupta
 
Java 101
Java 101Java 101
Java 101
javafxpert
 
Reversing and Patching Java Bytecode
Reversing and Patching Java BytecodeReversing and Patching Java Bytecode
Reversing and Patching Java Bytecode
Teodoro Cipresso
 
Java 12 - New features in action
Java 12 -   New features in actionJava 12 -   New features in action
Java 12 - New features in action
Marco Molteni
 
Introduction to Loops in Java | For, While, Do While, Infinite Loops | Edureka
Introduction to Loops in Java | For, While, Do While, Infinite Loops | EdurekaIntroduction to Loops in Java | For, While, Do While, Infinite Loops | Edureka
Introduction to Loops in Java | For, While, Do While, Infinite Loops | Edureka
Edureka!
 
The latest features coming to Java 12
The latest features coming to Java 12The latest features coming to Java 12
The latest features coming to Java 12
NexSoftsys
 
Java EE 7 and HTML5: Developing for the Cloud
Java EE 7 and HTML5: Developing for the CloudJava EE 7 and HTML5: Developing for the Cloud
Java EE 7 and HTML5: Developing for the Cloud
Arun Gupta
 
Building Large Java Projects Faster: Multicore javac and Makefile integration
Building Large Java Projects Faster: Multicore javac and Makefile integrationBuilding Large Java Projects Faster: Multicore javac and Makefile integration
Building Large Java Projects Faster: Multicore javac and Makefile integration
Fredrik Öhrström
 
Introduction tojavaandxml lc-slides01-fp2005-ver 1.0
Introduction tojavaandxml lc-slides01-fp2005-ver 1.0Introduction tojavaandxml lc-slides01-fp2005-ver 1.0
Introduction tojavaandxml lc-slides01-fp2005-ver 1.0
Sanjay Yadav
 
Applying Anti-Reversing Techniques to Java Bytecode
Applying Anti-Reversing Techniques to Java BytecodeApplying Anti-Reversing Techniques to Java Bytecode
Applying Anti-Reversing Techniques to Java Bytecode
Teodoro Cipresso
 
An Introduction to Java Compiler and Runtime
An Introduction to Java Compiler and RuntimeAn Introduction to Java Compiler and Runtime
An Introduction to Java Compiler and Runtime
Omar Bashir
 
Introduction to SAP Gateway and OData
Introduction to SAP Gateway and ODataIntroduction to SAP Gateway and OData
Introduction to SAP Gateway and OData
Chris Whealy
 
Java EE7 in action
Java EE7 in actionJava EE7 in action
Java EE7 in action
Ankara JUG
 
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX LondonJAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
Arun Gupta
 
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, JohannesburgJava EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Arun Gupta
 
PaaSing a Java EE 6 Application at Geecon 2012
PaaSing a Java EE 6 Application at Geecon 2012PaaSing a Java EE 6 Application at Geecon 2012
PaaSing a Java EE 6 Application at Geecon 2012
Arun Gupta
 
Java EE | Modular EJBs for Enterprise OSGi | Tim Ward
Java EE | Modular EJBs for Enterprise OSGi | Tim WardJava EE | Modular EJBs for Enterprise OSGi | Tim Ward
Java EE | Modular EJBs for Enterprise OSGi | Tim Ward
JAX London
 

What's hot (20)

Java compilation
Java compilationJava compilation
Java compilation
 
Core java introduction
Core java introductionCore java introduction
Core java introduction
 
JAX-RS 2.0: What’s New in JSR 339 ?
JAX-RS 2.0: What’s New in JSR 339 ?JAX-RS 2.0: What’s New in JSR 339 ?
JAX-RS 2.0: What’s New in JSR 339 ?
 
Java 101
Java 101Java 101
Java 101
 
Reversing and Patching Java Bytecode
Reversing and Patching Java BytecodeReversing and Patching Java Bytecode
Reversing and Patching Java Bytecode
 
Java 12 - New features in action
Java 12 -   New features in actionJava 12 -   New features in action
Java 12 - New features in action
 
Introduction to Loops in Java | For, While, Do While, Infinite Loops | Edureka
Introduction to Loops in Java | For, While, Do While, Infinite Loops | EdurekaIntroduction to Loops in Java | For, While, Do While, Infinite Loops | Edureka
Introduction to Loops in Java | For, While, Do While, Infinite Loops | Edureka
 
The latest features coming to Java 12
The latest features coming to Java 12The latest features coming to Java 12
The latest features coming to Java 12
 
Java EE 7 and HTML5: Developing for the Cloud
Java EE 7 and HTML5: Developing for the CloudJava EE 7 and HTML5: Developing for the Cloud
Java EE 7 and HTML5: Developing for the Cloud
 
Websocket 1.0
Websocket 1.0Websocket 1.0
Websocket 1.0
 
Building Large Java Projects Faster: Multicore javac and Makefile integration
Building Large Java Projects Faster: Multicore javac and Makefile integrationBuilding Large Java Projects Faster: Multicore javac and Makefile integration
Building Large Java Projects Faster: Multicore javac and Makefile integration
 
Introduction tojavaandxml lc-slides01-fp2005-ver 1.0
Introduction tojavaandxml lc-slides01-fp2005-ver 1.0Introduction tojavaandxml lc-slides01-fp2005-ver 1.0
Introduction tojavaandxml lc-slides01-fp2005-ver 1.0
 
Applying Anti-Reversing Techniques to Java Bytecode
Applying Anti-Reversing Techniques to Java BytecodeApplying Anti-Reversing Techniques to Java Bytecode
Applying Anti-Reversing Techniques to Java Bytecode
 
An Introduction to Java Compiler and Runtime
An Introduction to Java Compiler and RuntimeAn Introduction to Java Compiler and Runtime
An Introduction to Java Compiler and Runtime
 
Introduction to SAP Gateway and OData
Introduction to SAP Gateway and ODataIntroduction to SAP Gateway and OData
Introduction to SAP Gateway and OData
 
Java EE7 in action
Java EE7 in actionJava EE7 in action
Java EE7 in action
 
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX LondonJAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
 
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, JohannesburgJava EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
 
PaaSing a Java EE 6 Application at Geecon 2012
PaaSing a Java EE 6 Application at Geecon 2012PaaSing a Java EE 6 Application at Geecon 2012
PaaSing a Java EE 6 Application at Geecon 2012
 
Java EE | Modular EJBs for Enterprise OSGi | Tim Ward
Java EE | Modular EJBs for Enterprise OSGi | Tim WardJava EE | Modular EJBs for Enterprise OSGi | Tim Ward
Java EE | Modular EJBs for Enterprise OSGi | Tim Ward
 

Viewers also liked

Living on the edge
Living on the edgeLiving on the edge
Living on the edge
Adrian Cole
 
Developing design sense of code smells
Developing design sense of code smellsDeveloping design sense of code smells
Developing design sense of code smells
Llewellyn Falco
 
whats new in java 8
whats new in java 8 whats new in java 8
whats new in java 8
Dori Waldman
 
TDC 2015 - Java: from old school to modern art!
TDC 2015 - Java: from old school to modern art!TDC 2015 - Java: from old school to modern art!
TDC 2015 - Java: from old school to modern art!
Marcos Ferreira
 
Java 8: the good parts!
Java 8: the good parts!Java 8: the good parts!
Java 8: the good parts!
Andrzej Grzesik
 
Cloud Native Camel Riding
Cloud Native Camel RidingCloud Native Camel Riding
Cloud Native Camel Riding
Christian Posta
 
from old java to java8 - KanJava Edition
from old java to java8 - KanJava Editionfrom old java to java8 - KanJava Edition
from old java to java8 - KanJava Edition
心 谷本
 
50 new things you can do with java 8
50 new things you can do with java 850 new things you can do with java 8
50 new things you can do with java 8
José Paumard
 
Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8
AppDynamics
 
Java 8, Streams & Collectors, patterns, performances and parallelization
Java 8, Streams & Collectors, patterns, performances and parallelizationJava 8, Streams & Collectors, patterns, performances and parallelization
Java 8, Streams & Collectors, patterns, performances and parallelization
José Paumard
 
Java SE 8 best practices
Java SE 8 best practicesJava SE 8 best practices
Java SE 8 best practices
Stephen Colebourne
 
java 8
java 8java 8
Java tutorial PPT
Java tutorial PPTJava tutorial PPT
Java tutorial PPT
Intelligo Technologies
 

Viewers also liked (14)

Living on the edge
Living on the edgeLiving on the edge
Living on the edge
 
Developing design sense of code smells
Developing design sense of code smellsDeveloping design sense of code smells
Developing design sense of code smells
 
whats new in java 8
whats new in java 8 whats new in java 8
whats new in java 8
 
TDC 2015 - Java: from old school to modern art!
TDC 2015 - Java: from old school to modern art!TDC 2015 - Java: from old school to modern art!
TDC 2015 - Java: from old school to modern art!
 
Java 8 Features
Java 8 FeaturesJava 8 Features
Java 8 Features
 
Java 8: the good parts!
Java 8: the good parts!Java 8: the good parts!
Java 8: the good parts!
 
Cloud Native Camel Riding
Cloud Native Camel RidingCloud Native Camel Riding
Cloud Native Camel Riding
 
from old java to java8 - KanJava Edition
from old java to java8 - KanJava Editionfrom old java to java8 - KanJava Edition
from old java to java8 - KanJava Edition
 
50 new things you can do with java 8
50 new things you can do with java 850 new things you can do with java 8
50 new things you can do with java 8
 
Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8
 
Java 8, Streams & Collectors, patterns, performances and parallelization
Java 8, Streams & Collectors, patterns, performances and parallelizationJava 8, Streams & Collectors, patterns, performances and parallelization
Java 8, Streams & Collectors, patterns, performances and parallelization
 
Java SE 8 best practices
Java SE 8 best practicesJava SE 8 best practices
Java SE 8 best practices
 
java 8
java 8java 8
java 8
 
Java tutorial PPT
Java tutorial PPTJava tutorial PPT
Java tutorial PPT
 

Similar to What's new in Java 8

Server Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David DelabasseeServer Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David Delabassee
JAXLondon2014
 
55 New Features in Java SE 8
55 New Features in Java SE 855 New Features in Java SE 8
55 New Features in Java SE 8
Simon Ritter
 
JDK 10 Java Module System
JDK 10 Java Module SystemJDK 10 Java Module System
JDK 10 Java Module System
Wolfgang Weigend
 
Avatar 2.0
Avatar 2.0Avatar 2.0
Avatar 2.0
David Delabassee
 
Java 8 Overview
Java 8 OverviewJava 8 Overview
Java 8 Overview
Nicola Pedot
 
Apache Big Data Europe 2016
Apache Big Data Europe 2016Apache Big Data Europe 2016
Apache Big Data Europe 2016
Tim Ellison
 
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
AMD Developer Central
 
Preparing your code for Java 9
Preparing your code for Java 9Preparing your code for Java 9
Preparing your code for Java 9
Deepu Xavier
 
Improved Developer Productivity In JDK8
Improved Developer Productivity In JDK8Improved Developer Productivity In JDK8
Improved Developer Productivity In JDK8
Simon Ritter
 
Project Avatar (Lyon JUG & Alpes JUG - March 2014)
Project Avatar (Lyon JUG & Alpes JUG  - March 2014)Project Avatar (Lyon JUG & Alpes JUG  - March 2014)
Project Avatar (Lyon JUG & Alpes JUG - March 2014)David Delabassee
 
Java EE 7 et ensuite pourquoi pas JavaScript sur le serveur!
Java EE 7 et ensuite pourquoi pas JavaScript sur le serveur! Java EE 7 et ensuite pourquoi pas JavaScript sur le serveur!
Java EE 7 et ensuite pourquoi pas JavaScript sur le serveur! David Delabassee
 
Java SE 8
Java SE 8Java SE 8
Java SE 8
Simon Ritter
 
Java EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersJava EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c Developers
Bruno Borges
 
A Java Implementer's Guide to Boosting Apache Spark Performance by Tim Ellison.
A Java Implementer's Guide to Boosting Apache Spark Performance by Tim Ellison.A Java Implementer's Guide to Boosting Apache Spark Performance by Tim Ellison.
A Java Implementer's Guide to Boosting Apache Spark Performance by Tim Ellison.
J On The Beach
 
Graal Tutorial at CGO 2015 by Christian Wimmer
Graal Tutorial at CGO 2015 by Christian WimmerGraal Tutorial at CGO 2015 by Christian Wimmer
Graal Tutorial at CGO 2015 by Christian WimmerThomas Wuerthinger
 
Hotspot & AOT
Hotspot & AOTHotspot & AOT
Hotspot & AOT
Dmitry Chuyko
 
How Java 19 Influences the Future of Your High-Scale Applications .pdf
How Java 19 Influences the Future of Your High-Scale Applications .pdfHow Java 19 Influences the Future of Your High-Scale Applications .pdf
How Java 19 Influences the Future of Your High-Scale Applications .pdf
Ana-Maria Mihalceanu
 
Nashorn in the future (English)
Nashorn in the future (English)Nashorn in the future (English)
Nashorn in the future (English)
Logico
 
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 201310 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013Martin Fousek
 
Graal VM: Multi-Language Execution Platform
Graal VM: Multi-Language Execution PlatformGraal VM: Multi-Language Execution Platform
Graal VM: Multi-Language Execution Platform
Thomas Wuerthinger
 

Similar to What's new in Java 8 (20)

Server Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David DelabasseeServer Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David Delabassee
 
55 New Features in Java SE 8
55 New Features in Java SE 855 New Features in Java SE 8
55 New Features in Java SE 8
 
JDK 10 Java Module System
JDK 10 Java Module SystemJDK 10 Java Module System
JDK 10 Java Module System
 
Avatar 2.0
Avatar 2.0Avatar 2.0
Avatar 2.0
 
Java 8 Overview
Java 8 OverviewJava 8 Overview
Java 8 Overview
 
Apache Big Data Europe 2016
Apache Big Data Europe 2016Apache Big Data Europe 2016
Apache Big Data Europe 2016
 
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
 
Preparing your code for Java 9
Preparing your code for Java 9Preparing your code for Java 9
Preparing your code for Java 9
 
Improved Developer Productivity In JDK8
Improved Developer Productivity In JDK8Improved Developer Productivity In JDK8
Improved Developer Productivity In JDK8
 
Project Avatar (Lyon JUG & Alpes JUG - March 2014)
Project Avatar (Lyon JUG & Alpes JUG  - March 2014)Project Avatar (Lyon JUG & Alpes JUG  - March 2014)
Project Avatar (Lyon JUG & Alpes JUG - March 2014)
 
Java EE 7 et ensuite pourquoi pas JavaScript sur le serveur!
Java EE 7 et ensuite pourquoi pas JavaScript sur le serveur! Java EE 7 et ensuite pourquoi pas JavaScript sur le serveur!
Java EE 7 et ensuite pourquoi pas JavaScript sur le serveur!
 
Java SE 8
Java SE 8Java SE 8
Java SE 8
 
Java EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersJava EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c Developers
 
A Java Implementer's Guide to Boosting Apache Spark Performance by Tim Ellison.
A Java Implementer's Guide to Boosting Apache Spark Performance by Tim Ellison.A Java Implementer's Guide to Boosting Apache Spark Performance by Tim Ellison.
A Java Implementer's Guide to Boosting Apache Spark Performance by Tim Ellison.
 
Graal Tutorial at CGO 2015 by Christian Wimmer
Graal Tutorial at CGO 2015 by Christian WimmerGraal Tutorial at CGO 2015 by Christian Wimmer
Graal Tutorial at CGO 2015 by Christian Wimmer
 
Hotspot & AOT
Hotspot & AOTHotspot & AOT
Hotspot & AOT
 
How Java 19 Influences the Future of Your High-Scale Applications .pdf
How Java 19 Influences the Future of Your High-Scale Applications .pdfHow Java 19 Influences the Future of Your High-Scale Applications .pdf
How Java 19 Influences the Future of Your High-Scale Applications .pdf
 
Nashorn in the future (English)
Nashorn in the future (English)Nashorn in the future (English)
Nashorn in the future (English)
 
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 201310 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
 
Graal VM: Multi-Language Execution Platform
Graal VM: Multi-Language Execution PlatformGraal VM: Multi-Language Execution Platform
Graal VM: Multi-Language Execution Platform
 

More from jclingan

Top 10 Kubernetes Native Java Quarkus Features
Top 10 Kubernetes Native Java Quarkus FeaturesTop 10 Kubernetes Native Java Quarkus Features
Top 10 Kubernetes Native Java Quarkus Features
jclingan
 
MicroProfile: Optimizing Java EE for a Microservices Architecture
MicroProfile: Optimizing Java EE for a Microservices ArchitectureMicroProfile: Optimizing Java EE for a Microservices Architecture
MicroProfile: Optimizing Java EE for a Microservices Architecture
jclingan
 
MicroProfile Devoxx.us
MicroProfile Devoxx.usMicroProfile Devoxx.us
MicroProfile Devoxx.us
jclingan
 
Java EE Microservices
Java EE MicroservicesJava EE Microservices
Java EE Microservices
jclingan
 
MicroProfile
MicroProfileMicroProfile
MicroProfile
jclingan
 
Java 8
Java 8Java 8
Java 8
jclingan
 

More from jclingan (6)

Top 10 Kubernetes Native Java Quarkus Features
Top 10 Kubernetes Native Java Quarkus FeaturesTop 10 Kubernetes Native Java Quarkus Features
Top 10 Kubernetes Native Java Quarkus Features
 
MicroProfile: Optimizing Java EE for a Microservices Architecture
MicroProfile: Optimizing Java EE for a Microservices ArchitectureMicroProfile: Optimizing Java EE for a Microservices Architecture
MicroProfile: Optimizing Java EE for a Microservices Architecture
 
MicroProfile Devoxx.us
MicroProfile Devoxx.usMicroProfile Devoxx.us
MicroProfile Devoxx.us
 
Java EE Microservices
Java EE MicroservicesJava EE Microservices
Java EE Microservices
 
MicroProfile
MicroProfileMicroProfile
MicroProfile
 
Java 8
Java 8Java 8
Java 8
 

Recently uploaded

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 

Recently uploaded (20)

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 

What's new in Java 8

  • 1. What’s New in Java 8? John Clingan Oracle Product Manager – Java EE, GlassFish, EclipseLink, Avatar
  • 2. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.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.
  • 3. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.3 3 Lambda (JSR 335) Date/Time API (JSR 310) Type Annotations (JSR 308) Compact Profiles Lambda-Form Representation for Method Handles Remove the Permanent Generation Improve Contended Locking Generalized Target-Type Inference DocTree API Parallel Array SortingBulk Data Operations Unicode 6.2 Base64 Prepare for Modularization Parameter Names TLS Server Name Indication Configurable Secure-Random Number Generation Java SE 8 Nashorn Enhanced Verification Errors Fence Intrinsics Repeating Annotations HTTP URL Permissions Limited doPrivileged http://openjdk.java.net/projects/jdk8/features
  • 4. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.4 Java SE 8: Enhancing The Core Java Platform
  • 5. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.5 Java SE 8 !  Biggest change in the Java language since Java SE 5 !  Significant enhancements to the class libraries !  The main goal of these changes are … –  Better developer productivity –  More reliable code –  Better utilization of multi-core / multi-processor systems !  Code is no longer inherently serial or parallel
  • 6. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.6 Lambda Expressions !  Almost all machines now are multi-core, multi-processor, or both !  We need to make it simpler to write multi-threaded Java code –  Java has always had the concept of threads –  Even using the concurrency utilities and fork-join framework this is hard !  Let’s add better library code –  This is good, but sometimes we need to change the language too !  The answer: Lambda expressions and the streams API !  Backwards compatible with existing APIs like Collections. Why Do We Need Them?
  • 7. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.7 Lambda & Streams Demos
  • 8. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.8 Stream Sources !  From collections and arrays –  Collection.stream() –  Collection.parallelStream() –  Arrays.stream(T array) or Stream.of() !  Static factories –  IntStream.range() –  Files.walk() !  Roll your own –  java.util.Spliterator() Many Ways To Create
  • 9. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.9 Stream Sources !  Access to stream elements !  Decomposition (for parallel operations) –  Fork-join framework !  Stream characteristics –  ORDERED –  DISTINCT –  SORTED –  SIZED –  SUBSIZED –  NONNULL –  IMMUTABLE –  CONCURRENT Manage Three Aspects
  • 10. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.10 Optional<T> !  Used in new Java 8 APIs to replace null !  Indicates that reference may, or may not have a value !  Makes developer responsible for checking Reducing NullPointerException Occurences Optional<GPSData> maybeGPS = Optional.of(gpsData); maybeGPS = Optional.ofNullable(gpsData); maybeGPS.ifPresent(GPSData::printPosition); GPSData gps = maybeGPS.orElse(new GPSData()); maybeGPS.filter(g -> g.lastRead() < 2).ifPresent(GPSData.display());
  • 11. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.11 java.util.function Package !  Predicate<T> –  Determine if the input of type T matches some criteria !  Consumer<T> –  Accept a single input argumentof type T, and return no result !  Function<T, R> –  Apply a function to the input type T, generating a result of type R !  Plus several more
  • 12. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.12 Annotations On Java Types !  Annotations can currently only be used on type declarations –  Classes, methods, variable definitions !  Extension for places where types are used –  e.g. parameters !  Permits error detection by pluggable type checkers –  e.g. null pointer errors, race conditions, etc public void process(@notnull List data) {…}
  • 13. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.13 Concurrency Updates !  Scalable update variables –  DoubleAccumulator, DoubleAdder, etc –  Multiple variables avoid update contention –  Good for frequent updates, infrequent reads !  ConcurrentHashMap updates –  Improved scanning support, key computation !  ForkJoinPool improvements –  Completion based design for IO bound applications –  Thread that is blocked hands work to thread that is running
  • 14. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.14 Parallel Array Sorting !  Additional utility methods in java.util.Arrays –  parallelSort (multiple signatures for different primitives) !  Anticipated minimum improvement of 30% over sequential sort –  For dual core system with appropriate sized data set !  Built on top of the fork-join framework –  Uses Doug Lea’s ParallelArray implementation –  Requires working space the same size as the array being sorted
  • 15. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.15 Date And Time APIs !  A new date, time, and calendar API for the Java SE platform !  Supports standard time concepts –  Partial, duration, period, intervals –  date, time, instant, and time-zone !  Provides a limited set of calendar systems and be extensible to others !  Uses relevant standards, including ISO-8601, CLDR, and BCP47 !  Based on an explicit time-scale with a connection to UTC
  • 16. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.16 Base64 Encoding and Decoding !  Currently developers are forced to use non-public APIs –  sun.misc.BASE64Encoder –  sun.misc.BASE64Decoder !  Java SE 8 now has a standard way –  java.util.Base64.Encoder –  java.util.Base64.Decoder –  encode, encodeToString, decode, wrap methods
  • 17. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.17 Nashorn JavaScript Engine !  Lightweight, high-performance JavaScript engine –  Integrated into JRE !  Use existing javax.script API !  ECMAScript-262 Edition 5.1 language specification compliance !  New command-line tool, jjs to run JavaScript !  Internationalised error messages and documentation
  • 18. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.18 Native Memory Usage !  No more tuning PermGen –  PermGen – Artificial memory limitation –  Metaspace – Regular native allocation !  Limited only by process address space !  Can force a limit: -XX:MaxMetaspaceSize=<size> –  Part of the HotSpot, JRockit convergence !  Class data sharing across processes – Experimental feature –  Available on all platforms, -Xshare:[off|on|auto] –  Reduce footprint and startup sharing JDK classes between processes No more “java.lang.OutOfMemoryError: PermGen space”
  • 19. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.19 Multistep Optimization !  Interpreter " Client Compiler " Server Compiler –  Fast initial compilation –  Keep peak performance –  Enabled by default !  Improve time to performance –  Startup of large applications –  Performance for short running applications Tiered Compilation
  • 20. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.20 Java EE Application Deployment Tiered Compilation
  • 21. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.21 JSR 292 - InvokeDynamic !  Complete rewrite of the VM support for JSR 292 –  Improved stability, maintainability and performance !  Lambda –  Avoid repeated calculations during capture –  No allocation for non-capturing Lambdas –  On par or faster than inner classes !  JavaScript Engine – Nashorn –  Incremental inlining of MethodHandle invocations Major Updates
  • 22. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.22 JavaScript Engine - Nashorn JSR 292 - InvokeDynamic JDK 8 updates double performance of a couple of these
  • 23. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.23 Java Mission Control
  • 24. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.24 JavaFX 8 New Stylesheet 24 Caspian vs Modena
  • 25. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.25 JavaFX 8 !  Customisable –  Configurable key combinations to exit full screen mode –  Ability to prevent user exiting full screen mode Improvements To Full Screen Mode // Set the key combination that the user can use to exit stage.setFullScreenExitKeyCombination(KeyCombination.NO_MATCH); // Setup the click handler so we can escape from full screen Rectangle r = new Rectangle(0, 0, 250, 250); r.setOnMouseClicked(e -> stage.setFullScreen(false)); // Set full screen again stage.setFullScreen(true);
  • 26. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.26 JavaFX 8 !  New API for printing –  Currently only supported on desktop !  Any node can be printed Printing Support PrinterJob job = PrinterJob.createPrinterJob(printer); job.getJobSettings().setPageLayout(pageLayout); job.getJobSettings().setPrintQuality(PrintQuality.HIGH); job.getJobSettings().setPaperSource(PaperSource.MANUAL); job.getJobSettings().setCollation(Collation.COLLATED); if (job.printPage(someRichText)) job.endJob();
  • 27. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.27 JavaFX 8 !  DatePicker !  TreeTableView New Controls
  • 28. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.28 JavaFX 8 !  Gestures –  Swipe –  Scroll –  Rotate –  Zoom !  Touch events and touch points Touch Support
  • 29. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.29 JavaFX 8 !  Predefined shapes –  Box –  Cylinder –  Sphere !  User-defined shapes –  TriangleMesh, MeshView !  PhongMaterial !  Lighting !  Cameras 3D Support
  • 30. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.30 Compact Profiles Approximate static footprint goals Compact1 Profile Compact2 Profile Compact3 Profile Full JRE 54Mb 30Mb 16Mb 11Mb [Migration path for CDC, logging and SSL] [Adds XML, JDBC, RMI] [Adds mgmt, naming, more security, compiler support]
  • 31. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.31 Java SE Public Updates Schedule GA Date Notification of End of Public Updates End of Public Updates Java SE 1.4.2 Feb 2002 Dec 2006 Oct 2008 Java SE 5 May 2004 Apr 2008 Oct 2009 Java SE 6 Dec 2006 Feb 2011 Feb 2013 Java SE 7 July 2011 Mar 2014 April 2015 Java SE 8 Mar 2014 Mar 2016* TBD For details see, http://www.oracle.com/technetwork/java/eol-135779.html * Or later. Exact date TBD.
  • 32. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.32 Books !  “Java SE 8 for the Really Impatient” (Horstmann) !  “Functional Programming in Java: Harnessing the Power of Java 8 Lambda Expressions” (Subramaniam) !  “Mastering Lambdas: Java Programming in a Multicore World” (Naftalin) !  “Java 8 in Action: Lambdas, Streams, and functional-style programming” (Urma, Fusco, Mycroft) !  “Java 8 Lambdas: Pragmatic Functional Programming” (Warburton) !  “Java in a Nutshell” (Evans, Flanagan)
  • 33. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.33 Where Next?
  • 34. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.34 Java 9 And Beyond !  Modularisation of the Java platform –  Project Jigsaw !  Foreign function interface –  Like JNA !  Enhanced volatiles Java Never Stops
  • 35. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.35
  • 36. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.36
  • 37. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.37 Java SE Lifetime Support Policy GA Date Premier Support Extended Support Java SE 1.4.2 Feb 2002 Feb 2010 Feb 2013 Java SE 5 May 2004 May 2011 May 2015 Java SE 6 Dec 2006 Dec 2015 Jun 2018 Java SE 7 July 2011 July 2019 July 2022 Java SE 8 Mar 2014 Mar 2022 Mar 2025 For details see, http://www.oracle.com/support/library/brochure/lifetime-support-middleware.pdf
  • 38. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.38 Java SE Platform enhanced with enterprise-grade features for monitoring, manageability, and analytics. # 24x7 support, offered in 27 local languages # Security updates on older and current releases # Only source for Java SE 6 updates after Feb 2013 # Monitor, manage, and profile Java desktop applications # Enterprise JRE features i.e., Java SE usage tracking Java SE Commercial Products Java SE Suite Java SE Platform hardened for mission critical applications having extreme and predictable computing needs. # Soft real-time deterministic garbage collector for mission critical applications # Memory leak server for dynamic memory leak detection on mission critical production systems Java SE Support Oracle Premier Support for Java SE. # 24x7 support, offered in 27 local languages # Security updates on older and current releases # Only source for Java SE 6 updates after Feb 2013 # Enterprise JRE features i.e., update control Java SE Advanced Desktop and Java SE Advanced