SlideShare a Scribd company logo
Java SE 8 Features
Neuerungen in Java SE 8
pr sentiert von Sascha Kochä
12. M rz 2014ä
JUG Bielefeld
12.03.2014 Java SE 8
Alle freuen sich auf Java 8
Quelle www.heise.de
12.03.2014 Java SE 8
Programm f r heute abendü
● > 50 Neuerungen in Java SE 8
● Hands-on Session mit λ-Expressions, der
Stream API, den default methods und mehr
12.03.2014 Java SE 8
Java 8 JEPs General
● 126 Lambda Expressions & Virtual Extension Methods
(aka defender or default methods)
● 138 Autoconf-Based Build System (for the jdk itself)
● 160 Lambda-Form Representation for Method Handles
(reduce assembly code and native calls, performance optimization, reference implementation
of invokedynamic / JSR-292)
● 161 Compact Profiles (instead of jigsaw 140/24/17/10 MB)→
● 162 Prepare for Modularization
(getting ready for jigsaw, java.util.logging and swing)
12.03.2014 Java SE 8
Java 8 JEPs General
● 164 Leverage CPU Instructions for AES Cryptography
(Intel M rz 2008)ä
● 174 Nashorn JavaScript Engine
(lightweight, high-performance, ECMAScript-262 5.1)
● 176 Mechanical Checking of Caller-Sensitive Methods
(improve security of method-handle implementation, behaviour changed based on the caller)
● 179 Document JDK API Support and Stability
(mark core and non-core APIs, what is maintained?)
12.03.2014 Java SE 8
Java 8 JEPs Core
● 153 Launch JavaFX Applications
(launch() from java cmd line)
● 101 Generalized Target-Type Inference Code
(only partly realized)
● 104 Annotations on Java Types Code
(applied to any use of a type, not at runtime :( )
● 105 DocTree API (provide structured access to javadoc content)
● 106 Add Javadoc to javax.tools
(call javadoc from within vm)
12.03.2014 Java SE 8
Java 8 JEPs Core
● 117 Remove the Annotation-Processing Tool (in javac)
● 118 Access to Parameter Names at Runtime Code
(partly realized)
●
120 Repeating Annotations Code
(avoid container annotations, somehow)
● 139 Enhance javac to Improve Build Speed
(use of all available cores)
●
172 DocLint Code
(static doc analysis, Fusselig, W3C HTML 4.01 HTML conform)
12.03.2014 Java SE 8
Java 8 JEPs Garbage Collection
● 142 Reduce Cache Contention on Specified
Fields
(pad variables to avoid sharing cache lines)
● 122 Remove the Permanent Generation
(Permanently, PermGen moves to native memory)
●
173 Retire Some Rarely-Used GC Combination
(e.g. ParNew + SerialOld, reduce testing effort)
12.03.2014 Java SE 8
Java 8 JEPs Garbage Collection
● 142 Reduce Cache Contention on Specified
Fields
(pad variables to avoid sharing cache lines)
● 122 Remove the Permanent Generation
(Permanently, PermGen moves to native memory)
●
173 Retire Some Rarely-Used GC Combination
(e.g. ParNew + SerialOld, reduce testing effort)
12.03.2014 Java SE 8
Java 8 JEPs Runtime
● 136 Enhanced Verification Errors
(additional information bytecode verification errors)
● 147 Reduce Class Metadata Footprint
(taken from ME)
● 148 Small VM
(libjvm.so < 3MB, compiling size over speed)
● 171 Fence Intrinsics
(sun.misc.Unsafe, memory access)
12.03.2014 Java SE 8
Java 8 JEPs Core Libraries
●
103 Parallel Array Sorting (new methods in java.util.Arrays)
● 107 Bulk Data Operations for Collections
(java.util.function, java.util.stream)
●
109 Enhance Core Libraries with Lambda
(Java SE 7 has 4024 standard classes)
●
112 Charset Implementation Improvements
(fewer, quicker, better)
●
119 javax.lang.model Implementation Backed by Core
Reflection
12.03.2014 Java SE 8
Java 8 JEPs Core Libraries
● 135 Base64 Encoding & Decoding
(previously in sun.misc.*, now java.util.*)
● 149 Reduce Core-Library Memory Usage
(reduce dynamic memory)
● 150 Date & Time API
(Wurde auch Zeit!)
● 155 Concurrency Updates
(Doug Lea Stuff)
● 170 JDBC 4.2 (new Date API support)
12.03.2014 Java SE 8
How many Bugs?
Date date = new Date(2014, 12, 24, 16, 40);
TimeZone zone =
   TimeZone.getTimeZone(“Asia/HongKong”);
Calendar cal = 
   new GregorianCalendar(date, zone);
DateFormat fm = 
   new SimpleDateFormat(“HH:mm Z”);
String str = fm.format(cal);
12.03.2014 Java SE 8
How many Bugs? 6!
Date date = new Date(114, 11, 24, 16, 40);
TimeZone zone =
   TimeZone.getTimeZone(“Asia/Hong_Kong”);
Calendar cal = new GregorianCalendar(zone);
cal.setTime(date);
DateFormat fm = 
   new SimpleDateFormat(“HH:mm Z”);
fm.setTimeZone(zone);
Date calDate = cal.getTime();
String str = fm.format(calDate);
12.03.2014 Java SE 8
Java 8 JEPs Diverses
● 177 Optimize java.text.DecimalFormat.format
(2 x faster for 2 or 3 digits after decimal point)
● 178 Statically-Linked JNI Libraries
(previously only dynamically linked)
●
180 Handle Frequent HashMap Collisions with
Balanced Trees
(performance improvement, previously with linked lists)
●
12.03.2014 Java SE 8
Java 8 JEPs Diverses
●
127 Improve Locale Data Packaging and Adopt
Unicode CLDR Data
(standardized locale support)
● 128 BCP 47 Locale Matching
(as defined in rfc-4647)
●
133 Unicode 6.2
● 184 HTTP URL Permissions (previously based on IP addresses)
12.03.2014 Java SE 8
Java 8 Security
● 113 MS-SFU Kerberos 5 Extensions
(Microsoft interoperability)
●
114 TLS Server Name Indication (SNI) Extension (new feature)
●
115 AEAD CipherSuites (meet US government and banking requirements)
● 121 Stronger Algorithms for Password-Based Encryption
(evolution of cryptography, PBEwith*, previously DESede and RC2 with SHA1)
● 123 Configurable Secure Random-Number Generation
(/dev/random Entropie unter Linux ist alle)→
●
124 Enhance the Certificate Revocation-Checking API
(more complete,flexible)
12.03.2014 Java SE 8
Java 8 Security
●
129 NSA Suite B Cryptographic Algorithms
(meet US government and banking requirements)
● 130 SHA-224 Message Digests (known flaw in SHA-1)
● 131 PKCS#11 Crypto Provider for 64-bit Windows
(use of native Win64 libraries)
●
140 Limited doPrivileged (Lambda expressions)
● 166 Overhaul JKS-JCEKS-PKCS12 Keystores
(simplification of keystore handling)
12.03.2014 Java SE 8
Java 8 JEPs / Web JAXP
● 185 JAXP 1.5: Restrict Fetching of External
Resources
(restrict the set of network protocols used to fetch external resources)
12.03.2014 Java SE 8
Lambda Expressions
● Aka closures, function literals or Lambdas
● From anonymous inner classes to FunctionalInterfaces;
previously known as SAM (single abstract method)
●
Syntax:
1. argument list enclosed in parentheses
2. an arrow token ( )→
3. a function body
12.03.2014 Java SE 8
Default methods
● Interfaces can have default implementations
● Method starts with default
12.03.2014 Java SE 8
Lambda form representation
method handles
● object::instanceMethod
Arrays.asList(0, -2, 2).forEach(System.out::println);
Arrays.asList(0, -2, 2).forEach((x) System.out.println(x));→ →
● Class::staticMethod
Arrays.asList(0, -2, 2).sort(Integer::compare);
Arrays.asList(0, -2, 2).sort((x, y) Integer.compare(x, y));→ →
● Class::instanceMethod
Arrays.asList(0, -2, 2).sort(Integer::compareTo);
Arrays.asList(0, -2, 2).sort((x, y) x.compareTo(y));→ →
12.03.2014 Java SE 8
Collection vs Stream
Quelle: wikimedia.org
12.03.2014 Java SE 8
Stream-API
●
Get a stream from a collection
collection<E>.stream();
●
Generate, limit and skip a stream
Stream.generate(Supplier<T> s) // static
stream<T>.limit(long)
stream<T>.skip(long)
●
Manipulate a stream
stream<T>.map(Function<T, R>) Stream<R>→
stream<T>.filter(Predicate<T>) Stream<T>→
stream<T>.sorted() Stream<T>→
stream<T>.distinct() Stream<T>→
12.03.2014 Java SE 8
Stream-API
● “Collection a result” of a stream
stream<T>.allMatch(Predicate<T>) boolean→
stream<T>.anyMatch(Predicate<T>) boolean→
stream<T>.findAny() Optional<T>→
stream<T>.findFirst() Optional<T>→
stream<T>.max(Comparator<T>) Optional<T>→
stream<T>.min(Comparator<T>) Optional<T>→
stream<T>.reduce(T, BinaryOperator<T>) T→
stream<T>.collect(T, A, R) R→
12.03.2014 Java SE 8
Stream-API
● Default Collectors
Collectors.toList() Collector<T, ?, List<T>>→
Collectors.reducing(T, BinaryOperator<T>) T→
Collectors.joining() Collector<CharSeq, ?, String>→
Collectors.counting() Collector<T, ?, Long>→
12.03.2014 Java SE 8
Danke!
12.03.2014 Java SE 8
Referenzen
● http://www.youtube.com/watch?v=rtAredKhyac, Simon Ritter
● Java SE 8 for the Really Impatient, Cay S. Horstmann
● Java 8 in Action, Raoul-Gabiel Urma et.al
● http://openjdk.java.net/projects/jdk8/features

More Related Content

What's hot

jcmd #javacasual
jcmd #javacasualjcmd #javacasual
jcmd #javacasual
Yuji Kubota
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
Sveta Smirnova
 
What’s New in Oracle Database 12c for PHP
What’s New in Oracle Database 12c for PHPWhat’s New in Oracle Database 12c for PHP
What’s New in Oracle Database 12c for PHP
Christopher Jones
 
Using Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDBUsing Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDB
Antony T Curtis
 
Virtualizing Java in Java (jug.ru)
Virtualizing Java in Java (jug.ru)Virtualizing Java in Java (jug.ru)
Virtualizing Java in Java (jug.ru)
aragozin
 
Profiling & Testing with Spark
Profiling & Testing with SparkProfiling & Testing with Spark
Profiling & Testing with Spark
Roger Rafanell Mas
 
Mark Farnam : Minimizing the Concurrency Footprint of Transactions
Mark Farnam  : Minimizing the Concurrency Footprint of TransactionsMark Farnam  : Minimizing the Concurrency Footprint of Transactions
Mark Farnam : Minimizing the Concurrency Footprint of Transactions
Kyle Hailey
 
JahiaOne - Performance Tuning
JahiaOne - Performance TuningJahiaOne - Performance Tuning
JahiaOne - Performance Tuning
Jahia Solutions Group
 
Managing MariaDB Server operations with Percona Toolkit
Managing MariaDB Server operations with Percona ToolkitManaging MariaDB Server operations with Percona Toolkit
Managing MariaDB Server operations with Percona Toolkit
Sveta Smirnova
 
MySQL Performance Schema in 20 Minutes
 MySQL Performance Schema in 20 Minutes MySQL Performance Schema in 20 Minutes
MySQL Performance Schema in 20 Minutes
Sveta Smirnova
 
MySQL JSON Functions
MySQL JSON FunctionsMySQL JSON Functions
MySQL JSON Functions
Sveta Smirnova
 
Find bottleneck and tuning in Java Application
Find bottleneck and tuning in Java ApplicationFind bottleneck and tuning in Java Application
Find bottleneck and tuning in Java Application
guest1f2740
 
I know why your Java is slow
I know why your Java is slowI know why your Java is slow
I know why your Java is slow
aragozin
 
Performance Schema in Action: demo
Performance Schema in Action: demoPerformance Schema in Action: demo
Performance Schema in Action: demo
Sveta Smirnova
 
External Language Stored Procedures for MySQL
External Language Stored Procedures for MySQLExternal Language Stored Procedures for MySQL
External Language Stored Procedures for MySQLAntony T Curtis
 
자바 성능 강의
자바 성능 강의자바 성능 강의
자바 성능 강의
Terry Cho
 
Logical replication with pglogical
Logical replication with pglogicalLogical replication with pglogical
Logical replication with pglogical
Umair Shahid
 
Oracle Database SQL Tuning Concept
Oracle Database SQL Tuning ConceptOracle Database SQL Tuning Concept
Oracle Database SQL Tuning Concept
Chien Chung Shen
 
Cloug Troubleshooting Oracle 11g Rac 101 Tips And Tricks
Cloug Troubleshooting Oracle 11g Rac 101 Tips And TricksCloug Troubleshooting Oracle 11g Rac 101 Tips And Tricks
Cloug Troubleshooting Oracle 11g Rac 101 Tips And Tricks
Scott Jenner
 

What's hot (20)

jcmd #javacasual
jcmd #javacasualjcmd #javacasual
jcmd #javacasual
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
 
What’s New in Oracle Database 12c for PHP
What’s New in Oracle Database 12c for PHPWhat’s New in Oracle Database 12c for PHP
What’s New in Oracle Database 12c for PHP
 
Using Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDBUsing Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDB
 
Virtualizing Java in Java (jug.ru)
Virtualizing Java in Java (jug.ru)Virtualizing Java in Java (jug.ru)
Virtualizing Java in Java (jug.ru)
 
Profiling & Testing with Spark
Profiling & Testing with SparkProfiling & Testing with Spark
Profiling & Testing with Spark
 
Mark Farnam : Minimizing the Concurrency Footprint of Transactions
Mark Farnam  : Minimizing the Concurrency Footprint of TransactionsMark Farnam  : Minimizing the Concurrency Footprint of Transactions
Mark Farnam : Minimizing the Concurrency Footprint of Transactions
 
JahiaOne - Performance Tuning
JahiaOne - Performance TuningJahiaOne - Performance Tuning
JahiaOne - Performance Tuning
 
Managing MariaDB Server operations with Percona Toolkit
Managing MariaDB Server operations with Percona ToolkitManaging MariaDB Server operations with Percona Toolkit
Managing MariaDB Server operations with Percona Toolkit
 
MySQL Performance Schema in 20 Minutes
 MySQL Performance Schema in 20 Minutes MySQL Performance Schema in 20 Minutes
MySQL Performance Schema in 20 Minutes
 
MySQL JSON Functions
MySQL JSON FunctionsMySQL JSON Functions
MySQL JSON Functions
 
Find bottleneck and tuning in Java Application
Find bottleneck and tuning in Java ApplicationFind bottleneck and tuning in Java Application
Find bottleneck and tuning in Java Application
 
I know why your Java is slow
I know why your Java is slowI know why your Java is slow
I know why your Java is slow
 
Performance Schema in Action: demo
Performance Schema in Action: demoPerformance Schema in Action: demo
Performance Schema in Action: demo
 
External Language Stored Procedures for MySQL
External Language Stored Procedures for MySQLExternal Language Stored Procedures for MySQL
External Language Stored Procedures for MySQL
 
자바 성능 강의
자바 성능 강의자바 성능 강의
자바 성능 강의
 
Logical replication with pglogical
Logical replication with pglogicalLogical replication with pglogical
Logical replication with pglogical
 
Oracle Database SQL Tuning Concept
Oracle Database SQL Tuning ConceptOracle Database SQL Tuning Concept
Oracle Database SQL Tuning Concept
 
Cloug Troubleshooting Oracle 11g Rac 101 Tips And Tricks
Cloug Troubleshooting Oracle 11g Rac 101 Tips And TricksCloug Troubleshooting Oracle 11g Rac 101 Tips And Tricks
Cloug Troubleshooting Oracle 11g Rac 101 Tips And Tricks
 
Intro to ASH
Intro to ASHIntro to ASH
Intro to ASH
 

Similar to java8-features

Panama.pdf
Panama.pdfPanama.pdf
Java user group 2015 02-09-java8
Java user group 2015 02-09-java8Java user group 2015 02-09-java8
Java user group 2015 02-09-java8
Marc Tritschler
 
Java user group 2015 02-09-java8
Java user group 2015 02-09-java8Java user group 2015 02-09-java8
Java user group 2015 02-09-java8
marctritschler
 
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
 
Java 9-10 What's New
Java 9-10 What's NewJava 9-10 What's New
Java 9-10 What's New
Nicola Pedot
 
JavaOne 2011 Recap
JavaOne 2011 RecapJavaOne 2011 Recap
JavaOne 2011 Recap
Jim Bethancourt
 
De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14
Víctor Leonel Orozco López
 
Java one 2010
Java one 2010Java one 2010
Java one 2010
scdn
 
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
Mattias Karlsson
 
PostgreSQL and PL/Java
PostgreSQL and PL/JavaPostgreSQL and PL/Java
PostgreSQL and PL/Java
Peter Eisentraut
 
Java 9 new features
Java 9 new featuresJava 9 new features
Java 9 new features
Masudul Haque
 
Hw09 Sqoop Database Import For Hadoop
Hw09   Sqoop Database Import For HadoopHw09   Sqoop Database Import For Hadoop
Hw09 Sqoop Database Import For HadoopCloudera, Inc.
 
Java Programming - 01 intro to java
Java Programming - 01 intro to javaJava Programming - 01 intro to java
Java Programming - 01 intro to java
Danairat Thanabodithammachari
 
Accelerating Spark SQL Workloads to 50X Performance with Apache Arrow-Based F...
Accelerating Spark SQL Workloads to 50X Performance with Apache Arrow-Based F...Accelerating Spark SQL Workloads to 50X Performance with Apache Arrow-Based F...
Accelerating Spark SQL Workloads to 50X Performance with Apache Arrow-Based F...
Databricks
 
What to expect from Java 9
What to expect from Java 9What to expect from Java 9
What to expect from Java 9
Ivan Krylov
 
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
 
What's new in Java 8
What's new in Java 8What's new in Java 8
What's new in Java 8
jclingan
 
Java 8
Java 8Java 8
Java 8
jclingan
 
De Java 8 ate Java 14
De Java 8 ate Java 14De Java 8 ate Java 14
De Java 8 ate Java 14
Víctor Leonel Orozco López
 
Java features. Java 8, 9, 10, 11
Java features. Java 8, 9, 10, 11Java features. Java 8, 9, 10, 11
Java features. Java 8, 9, 10, 11
Ivelin Yanev
 

Similar to java8-features (20)

Panama.pdf
Panama.pdfPanama.pdf
Panama.pdf
 
Java user group 2015 02-09-java8
Java user group 2015 02-09-java8Java user group 2015 02-09-java8
Java user group 2015 02-09-java8
 
Java user group 2015 02-09-java8
Java user group 2015 02-09-java8Java user group 2015 02-09-java8
Java user group 2015 02-09-java8
 
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 9-10 What's New
Java 9-10 What's NewJava 9-10 What's New
Java 9-10 What's New
 
JavaOne 2011 Recap
JavaOne 2011 RecapJavaOne 2011 Recap
JavaOne 2011 Recap
 
De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14
 
Java one 2010
Java one 2010Java one 2010
Java one 2010
 
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
 
PostgreSQL and PL/Java
PostgreSQL and PL/JavaPostgreSQL and PL/Java
PostgreSQL and PL/Java
 
Java 9 new features
Java 9 new featuresJava 9 new features
Java 9 new features
 
Hw09 Sqoop Database Import For Hadoop
Hw09   Sqoop Database Import For HadoopHw09   Sqoop Database Import For Hadoop
Hw09 Sqoop Database Import For Hadoop
 
Java Programming - 01 intro to java
Java Programming - 01 intro to javaJava Programming - 01 intro to java
Java Programming - 01 intro to java
 
Accelerating Spark SQL Workloads to 50X Performance with Apache Arrow-Based F...
Accelerating Spark SQL Workloads to 50X Performance with Apache Arrow-Based F...Accelerating Spark SQL Workloads to 50X Performance with Apache Arrow-Based F...
Accelerating Spark SQL Workloads to 50X Performance with Apache Arrow-Based F...
 
What to expect from Java 9
What to expect from Java 9What to expect from Java 9
What to expect from Java 9
 
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
 
What's new in Java 8
What's new in Java 8What's new in Java 8
What's new in Java 8
 
Java 8
Java 8Java 8
Java 8
 
De Java 8 ate Java 14
De Java 8 ate Java 14De Java 8 ate Java 14
De Java 8 ate Java 14
 
Java features. Java 8, 9, 10, 11
Java features. Java 8, 9, 10, 11Java features. Java 8, 9, 10, 11
Java features. Java 8, 9, 10, 11
 

Recently uploaded

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
 
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
 
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
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
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
 
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
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
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
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
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
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
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
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 

Recently uploaded (20)

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...
 
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
 
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
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
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
 
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
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
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!
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
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?
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
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
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 

java8-features

  • 1. Java SE 8 Features Neuerungen in Java SE 8 pr sentiert von Sascha Kochä 12. M rz 2014ä JUG Bielefeld
  • 2. 12.03.2014 Java SE 8 Alle freuen sich auf Java 8 Quelle www.heise.de
  • 3. 12.03.2014 Java SE 8 Programm f r heute abendü ● > 50 Neuerungen in Java SE 8 ● Hands-on Session mit λ-Expressions, der Stream API, den default methods und mehr
  • 4. 12.03.2014 Java SE 8 Java 8 JEPs General ● 126 Lambda Expressions & Virtual Extension Methods (aka defender or default methods) ● 138 Autoconf-Based Build System (for the jdk itself) ● 160 Lambda-Form Representation for Method Handles (reduce assembly code and native calls, performance optimization, reference implementation of invokedynamic / JSR-292) ● 161 Compact Profiles (instead of jigsaw 140/24/17/10 MB)→ ● 162 Prepare for Modularization (getting ready for jigsaw, java.util.logging and swing)
  • 5. 12.03.2014 Java SE 8 Java 8 JEPs General ● 164 Leverage CPU Instructions for AES Cryptography (Intel M rz 2008)ä ● 174 Nashorn JavaScript Engine (lightweight, high-performance, ECMAScript-262 5.1) ● 176 Mechanical Checking of Caller-Sensitive Methods (improve security of method-handle implementation, behaviour changed based on the caller) ● 179 Document JDK API Support and Stability (mark core and non-core APIs, what is maintained?)
  • 6. 12.03.2014 Java SE 8 Java 8 JEPs Core ● 153 Launch JavaFX Applications (launch() from java cmd line) ● 101 Generalized Target-Type Inference Code (only partly realized) ● 104 Annotations on Java Types Code (applied to any use of a type, not at runtime :( ) ● 105 DocTree API (provide structured access to javadoc content) ● 106 Add Javadoc to javax.tools (call javadoc from within vm)
  • 7. 12.03.2014 Java SE 8 Java 8 JEPs Core ● 117 Remove the Annotation-Processing Tool (in javac) ● 118 Access to Parameter Names at Runtime Code (partly realized) ● 120 Repeating Annotations Code (avoid container annotations, somehow) ● 139 Enhance javac to Improve Build Speed (use of all available cores) ● 172 DocLint Code (static doc analysis, Fusselig, W3C HTML 4.01 HTML conform)
  • 8. 12.03.2014 Java SE 8 Java 8 JEPs Garbage Collection ● 142 Reduce Cache Contention on Specified Fields (pad variables to avoid sharing cache lines) ● 122 Remove the Permanent Generation (Permanently, PermGen moves to native memory) ● 173 Retire Some Rarely-Used GC Combination (e.g. ParNew + SerialOld, reduce testing effort)
  • 9. 12.03.2014 Java SE 8 Java 8 JEPs Garbage Collection ● 142 Reduce Cache Contention on Specified Fields (pad variables to avoid sharing cache lines) ● 122 Remove the Permanent Generation (Permanently, PermGen moves to native memory) ● 173 Retire Some Rarely-Used GC Combination (e.g. ParNew + SerialOld, reduce testing effort)
  • 10. 12.03.2014 Java SE 8 Java 8 JEPs Runtime ● 136 Enhanced Verification Errors (additional information bytecode verification errors) ● 147 Reduce Class Metadata Footprint (taken from ME) ● 148 Small VM (libjvm.so < 3MB, compiling size over speed) ● 171 Fence Intrinsics (sun.misc.Unsafe, memory access)
  • 11. 12.03.2014 Java SE 8 Java 8 JEPs Core Libraries ● 103 Parallel Array Sorting (new methods in java.util.Arrays) ● 107 Bulk Data Operations for Collections (java.util.function, java.util.stream) ● 109 Enhance Core Libraries with Lambda (Java SE 7 has 4024 standard classes) ● 112 Charset Implementation Improvements (fewer, quicker, better) ● 119 javax.lang.model Implementation Backed by Core Reflection
  • 12. 12.03.2014 Java SE 8 Java 8 JEPs Core Libraries ● 135 Base64 Encoding & Decoding (previously in sun.misc.*, now java.util.*) ● 149 Reduce Core-Library Memory Usage (reduce dynamic memory) ● 150 Date & Time API (Wurde auch Zeit!) ● 155 Concurrency Updates (Doug Lea Stuff) ● 170 JDBC 4.2 (new Date API support)
  • 13. 12.03.2014 Java SE 8 How many Bugs? Date date = new Date(2014, 12, 24, 16, 40); TimeZone zone =    TimeZone.getTimeZone(“Asia/HongKong”); Calendar cal =     new GregorianCalendar(date, zone); DateFormat fm =     new SimpleDateFormat(“HH:mm Z”); String str = fm.format(cal);
  • 14. 12.03.2014 Java SE 8 How many Bugs? 6! Date date = new Date(114, 11, 24, 16, 40); TimeZone zone =    TimeZone.getTimeZone(“Asia/Hong_Kong”); Calendar cal = new GregorianCalendar(zone); cal.setTime(date); DateFormat fm =     new SimpleDateFormat(“HH:mm Z”); fm.setTimeZone(zone); Date calDate = cal.getTime(); String str = fm.format(calDate);
  • 15. 12.03.2014 Java SE 8 Java 8 JEPs Diverses ● 177 Optimize java.text.DecimalFormat.format (2 x faster for 2 or 3 digits after decimal point) ● 178 Statically-Linked JNI Libraries (previously only dynamically linked) ● 180 Handle Frequent HashMap Collisions with Balanced Trees (performance improvement, previously with linked lists) ●
  • 16. 12.03.2014 Java SE 8 Java 8 JEPs Diverses ● 127 Improve Locale Data Packaging and Adopt Unicode CLDR Data (standardized locale support) ● 128 BCP 47 Locale Matching (as defined in rfc-4647) ● 133 Unicode 6.2 ● 184 HTTP URL Permissions (previously based on IP addresses)
  • 17. 12.03.2014 Java SE 8 Java 8 Security ● 113 MS-SFU Kerberos 5 Extensions (Microsoft interoperability) ● 114 TLS Server Name Indication (SNI) Extension (new feature) ● 115 AEAD CipherSuites (meet US government and banking requirements) ● 121 Stronger Algorithms for Password-Based Encryption (evolution of cryptography, PBEwith*, previously DESede and RC2 with SHA1) ● 123 Configurable Secure Random-Number Generation (/dev/random Entropie unter Linux ist alle)→ ● 124 Enhance the Certificate Revocation-Checking API (more complete,flexible)
  • 18. 12.03.2014 Java SE 8 Java 8 Security ● 129 NSA Suite B Cryptographic Algorithms (meet US government and banking requirements) ● 130 SHA-224 Message Digests (known flaw in SHA-1) ● 131 PKCS#11 Crypto Provider for 64-bit Windows (use of native Win64 libraries) ● 140 Limited doPrivileged (Lambda expressions) ● 166 Overhaul JKS-JCEKS-PKCS12 Keystores (simplification of keystore handling)
  • 19. 12.03.2014 Java SE 8 Java 8 JEPs / Web JAXP ● 185 JAXP 1.5: Restrict Fetching of External Resources (restrict the set of network protocols used to fetch external resources)
  • 20. 12.03.2014 Java SE 8 Lambda Expressions ● Aka closures, function literals or Lambdas ● From anonymous inner classes to FunctionalInterfaces; previously known as SAM (single abstract method) ● Syntax: 1. argument list enclosed in parentheses 2. an arrow token ( )→ 3. a function body
  • 21. 12.03.2014 Java SE 8 Default methods ● Interfaces can have default implementations ● Method starts with default
  • 22. 12.03.2014 Java SE 8 Lambda form representation method handles ● object::instanceMethod Arrays.asList(0, -2, 2).forEach(System.out::println); Arrays.asList(0, -2, 2).forEach((x) System.out.println(x));→ → ● Class::staticMethod Arrays.asList(0, -2, 2).sort(Integer::compare); Arrays.asList(0, -2, 2).sort((x, y) Integer.compare(x, y));→ → ● Class::instanceMethod Arrays.asList(0, -2, 2).sort(Integer::compareTo); Arrays.asList(0, -2, 2).sort((x, y) x.compareTo(y));→ →
  • 23. 12.03.2014 Java SE 8 Collection vs Stream Quelle: wikimedia.org
  • 24. 12.03.2014 Java SE 8 Stream-API ● Get a stream from a collection collection<E>.stream(); ● Generate, limit and skip a stream Stream.generate(Supplier<T> s) // static stream<T>.limit(long) stream<T>.skip(long) ● Manipulate a stream stream<T>.map(Function<T, R>) Stream<R>→ stream<T>.filter(Predicate<T>) Stream<T>→ stream<T>.sorted() Stream<T>→ stream<T>.distinct() Stream<T>→
  • 25. 12.03.2014 Java SE 8 Stream-API ● “Collection a result” of a stream stream<T>.allMatch(Predicate<T>) boolean→ stream<T>.anyMatch(Predicate<T>) boolean→ stream<T>.findAny() Optional<T>→ stream<T>.findFirst() Optional<T>→ stream<T>.max(Comparator<T>) Optional<T>→ stream<T>.min(Comparator<T>) Optional<T>→ stream<T>.reduce(T, BinaryOperator<T>) T→ stream<T>.collect(T, A, R) R→
  • 26. 12.03.2014 Java SE 8 Stream-API ● Default Collectors Collectors.toList() Collector<T, ?, List<T>>→ Collectors.reducing(T, BinaryOperator<T>) T→ Collectors.joining() Collector<CharSeq, ?, String>→ Collectors.counting() Collector<T, ?, Long>→
  • 27. 12.03.2014 Java SE 8 Danke!
  • 28. 12.03.2014 Java SE 8 Referenzen ● http://www.youtube.com/watch?v=rtAredKhyac, Simon Ritter ● Java SE 8 for the Really Impatient, Cay S. Horstmann ● Java 8 in Action, Raoul-Gabiel Urma et.al ● http://openjdk.java.net/projects/jdk8/features