Submit Search
Upload
Java, Moving Forward
•
Download as KEY, PDF
•
3 likes
•
1,365 views
輝 子安
Follow
the Topics in JavaSE8 and some of Key features in JavaEE7.
Read less
Read more
Technology
Entertainment & Humor
Slideshow view
Report
Share
Slideshow view
Report
Share
1 of 129
Download now
Recommended
Java, Up to Date
Java, Up to Date
輝 子安
Garbage Collection for Dummies
Garbage Collection for Dummies
輝 子安
Java Edge.2007.What.Is.New.In.Jsf.2
Java Edge.2007.What.Is.New.In.Jsf.2
roialdaag
Java EE 7 et ensuite pourquoi pas JavaScript sur le serveur!
Java EE 7 et ensuite pourquoi pas JavaScript sur le serveur!
David Delabassee
20120723 aws meister-reloaded-awssd-kfor_ruby-php-python-public
20120723 aws meister-reloaded-awssd-kfor_ruby-php-python-public
Amazon Web Services Japan
Nashorn : JavaScript Running on Java VM (Japanese)
Nashorn : JavaScript Running on Java VM (Japanese)
Logico
Nashorn: JavaScript Running on Java VM (English)
Nashorn: JavaScript Running on Java VM (English)
Logico
Scala for Java programmers
Scala for Java programmers
輝 子安
Recommended
Java, Up to Date
Java, Up to Date
輝 子安
Garbage Collection for Dummies
Garbage Collection for Dummies
輝 子安
Java Edge.2007.What.Is.New.In.Jsf.2
Java Edge.2007.What.Is.New.In.Jsf.2
roialdaag
Java EE 7 et ensuite pourquoi pas JavaScript sur le serveur!
Java EE 7 et ensuite pourquoi pas JavaScript sur le serveur!
David Delabassee
20120723 aws meister-reloaded-awssd-kfor_ruby-php-python-public
20120723 aws meister-reloaded-awssd-kfor_ruby-php-python-public
Amazon Web Services Japan
Nashorn : JavaScript Running on Java VM (Japanese)
Nashorn : JavaScript Running on Java VM (Japanese)
Logico
Nashorn: JavaScript Running on Java VM (English)
Nashorn: JavaScript Running on Java VM (English)
Logico
Scala for Java programmers
Scala for Java programmers
輝 子安
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
Martin Fousek
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
Mert Çalışkan
JSX
JSX
Kazuho Oku
How Scala, Wicket, and Java EE Can Improve Web Development
How Scala, Wicket, and Java EE Can Improve Web Development
Bruno Borges
Project Jigsaw in JDK9
Project Jigsaw in JDK9
Simon Ritter
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
Jagadish Prasath
Complete Dojo
Complete Dojo
Girish Srivastava
Project Jigsaw in JDK 9: Modularity Comes To Java
Project Jigsaw in JDK 9: Modularity Comes To Java
C4Media
What's new for JavaFX in JDK8 - Weaver
What's new for JavaFX in JDK8 - Weaver
Codemotion
Hello, Guava !
Hello, Guava !
輝 子安
JavaOne Update zur Java Plattform
JavaOne Update zur Java Plattform
Java Usergroup Berlin-Brandenburg
Java SE 8
Java SE 8
Simon Ritter
What's New in the JVM in Java 8?
What's New in the JVM in Java 8?
Azul Systems Inc.
What's New in the JVM in Java 8?
What's New in the JVM in Java 8?
Azul Systems, Inc.
JDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java Smaller
Simon Ritter
[English version] JavaFX and Web Integration
[English version] JavaFX and Web Integration
Kazuchika Sekiya
Introduction to JavaFX on Raspberry Pi
Introduction to JavaFX on Raspberry Pi
Bruno Borges
Building Large Java Projects Faster: Multicore javac and Makefile integration
Building Large Java Projects Faster: Multicore javac and Makefile integration
Fredrik Öhrström
BoxGrinder – FOSDEM 2012
BoxGrinder – FOSDEM 2012
marekgoldmann
What's Expected in Java 7
What's Expected in Java 7
Gal Marder
Protractor under the hood
Protractor under the hood
輝 子安
そろそろLambda(CI/CD編)
そろそろLambda(CI/CD編)
輝 子安
More Related Content
Similar to Java, Moving Forward
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
Martin Fousek
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
Mert Çalışkan
JSX
JSX
Kazuho Oku
How Scala, Wicket, and Java EE Can Improve Web Development
How Scala, Wicket, and Java EE Can Improve Web Development
Bruno Borges
Project Jigsaw in JDK9
Project Jigsaw in JDK9
Simon Ritter
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
Jagadish Prasath
Complete Dojo
Complete Dojo
Girish Srivastava
Project Jigsaw in JDK 9: Modularity Comes To Java
Project Jigsaw in JDK 9: Modularity Comes To Java
C4Media
What's new for JavaFX in JDK8 - Weaver
What's new for JavaFX in JDK8 - Weaver
Codemotion
Hello, Guava !
Hello, Guava !
輝 子安
JavaOne Update zur Java Plattform
JavaOne Update zur Java Plattform
Java Usergroup Berlin-Brandenburg
Java SE 8
Java SE 8
Simon Ritter
What's New in the JVM in Java 8?
What's New in the JVM in Java 8?
Azul Systems Inc.
What's New in the JVM in Java 8?
What's New in the JVM in Java 8?
Azul Systems, Inc.
JDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java Smaller
Simon Ritter
[English version] JavaFX and Web Integration
[English version] JavaFX and Web Integration
Kazuchika Sekiya
Introduction to JavaFX on Raspberry Pi
Introduction to JavaFX on Raspberry Pi
Bruno Borges
Building Large Java Projects Faster: Multicore javac and Makefile integration
Building Large Java Projects Faster: Multicore javac and Makefile integration
Fredrik Öhrström
BoxGrinder – FOSDEM 2012
BoxGrinder – FOSDEM 2012
marekgoldmann
What's Expected in Java 7
What's Expected in Java 7
Gal Marder
Similar to Java, Moving Forward
(20)
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JSX
JSX
How Scala, Wicket, and Java EE Can Improve Web Development
How Scala, Wicket, and Java EE Can Improve Web Development
Project Jigsaw in JDK9
Project Jigsaw in JDK9
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
Complete Dojo
Complete Dojo
Project Jigsaw in JDK 9: Modularity Comes To Java
Project Jigsaw in JDK 9: Modularity Comes To Java
What's new for JavaFX in JDK8 - Weaver
What's new for JavaFX in JDK8 - Weaver
Hello, Guava !
Hello, Guava !
JavaOne Update zur Java Plattform
JavaOne Update zur Java Plattform
Java SE 8
Java SE 8
What's New in the JVM in Java 8?
What's New in the JVM in Java 8?
What's New in the JVM in Java 8?
What's New in the JVM in Java 8?
JDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java Smaller
[English version] JavaFX and Web Integration
[English version] JavaFX and Web Integration
Introduction to JavaFX on Raspberry Pi
Introduction to JavaFX on Raspberry Pi
Building Large Java Projects Faster: Multicore javac and Makefile integration
Building Large Java Projects Faster: Multicore javac and Makefile integration
BoxGrinder – FOSDEM 2012
BoxGrinder – FOSDEM 2012
What's Expected in Java 7
What's Expected in Java 7
More from 輝 子安
Protractor under the hood
Protractor under the hood
輝 子安
そろそろLambda(CI/CD編)
そろそろLambda(CI/CD編)
輝 子安
Dockerで構成するWebサービス 〜EmotionTechの場合〜
Dockerで構成するWebサービス 〜EmotionTechの場合〜
輝 子安
Workshop: Docker on Elastic Beanstalk
Workshop: Docker on Elastic Beanstalk
輝 子安
PHP conference 2013 ja report
PHP conference 2013 ja report
輝 子安
JavaOne Guide for the Petite Bourgeoisie
JavaOne Guide for the Petite Bourgeoisie
輝 子安
Java, Up to Date Sources
Java, Up to Date Sources
輝 子安
Hello, Guava ! samples
Hello, Guava ! samples
輝 子安
Tokyo Cabinet & Tokyo Tyrant
Tokyo Cabinet & Tokyo Tyrant
輝 子安
More from 輝 子安
(9)
Protractor under the hood
Protractor under the hood
そろそろLambda(CI/CD編)
そろそろLambda(CI/CD編)
Dockerで構成するWebサービス 〜EmotionTechの場合〜
Dockerで構成するWebサービス 〜EmotionTechの場合〜
Workshop: Docker on Elastic Beanstalk
Workshop: Docker on Elastic Beanstalk
PHP conference 2013 ja report
PHP conference 2013 ja report
JavaOne Guide for the Petite Bourgeoisie
JavaOne Guide for the Petite Bourgeoisie
Java, Up to Date Sources
Java, Up to Date Sources
Hello, Guava ! samples
Hello, Guava ! samples
Tokyo Cabinet & Tokyo Tyrant
Tokyo Cabinet & Tokyo Tyrant
Recently uploaded
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
apidays
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
lior mazor
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
Architecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
apidays
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
Andrey Devyatkin
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
Nanddeep Nachan
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Product Anonymous
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Khushali Kathiriya
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Deepika Singh
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
wesley chun
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Igalia
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
sammart93
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Remote DBA Services
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
apidays
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
rafiqahmad00786416
Recently uploaded
(20)
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Architecting Cloud Native Applications
Architecting Cloud Native Applications
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
Java, Moving Forward
1.
JAVA, MOVING FORWARD
JavaSE8 & JavaEE7 Copyright © 2012 Akira Koyasu. Some rights reserved.
2.
JavaOne Tokyo 2012
April 4-5 2 Copyright © 2012 Akira Koyasu. Some rights reserved.
3.
the Coming Technologies 3
Copyright © 2012 Akira Koyasu. Some rights reserved.
4.
the Coming Technologies
JavaSE8 Project Jigsaw Project Lambda HotRockit Nashorn 3 Copyright © 2012 Akira Koyasu. Some rights reserved.
5.
the Coming Technologies
JavaSE8 JavaEE7 Project Jigsaw PaaS Project Lambda JAX-RS 2.0 HotRockit JCache Nashorn 3 Copyright © 2012 Akira Koyasu. Some rights reserved.
6.
JavaSE8
Copyright © 2012 Akira Koyasu. Some rights reserved.
7.
JavaSE Roadmap
2011 2012 2013 2011/7/28 2012 later 2013 Summer JavaSE7 JavaSE7u6 JavaSE8 JRE for MacOSX Jigsaw 2012/4/27 Auto-update Lambda JavaFX3.0 JavaSE7u4 HotRockit JDK for MacOSX Nashorn JavaFX2.1 2012/11 G1GC JRE default JavaSE6 Last public update 5 Copyright © 2012 Akira Koyasu. Some rights reserved.
8.
Themes of JavaSE8
(from JSR 337) 6 Copyright © 2012 Akira Koyasu. Some rights reserved.
9.
Themes of JavaSE8
(from JSR 337) Productivity 6 Copyright © 2012 Akira Koyasu. Some rights reserved.
10.
Themes of JavaSE8
(from JSR 337) Productivity Performance 6 Copyright © 2012 Akira Koyasu. Some rights reserved.
11.
Themes of JavaSE8
(from JSR 337) Productivity Performance Modularity 6 Copyright © 2012 Akira Koyasu. Some rights reserved.
12.
JavaSE8
Project Jigsaw Project Lambda HotRockit Nashorn 7 Copyright © 2012 Akira Koyasu. Some rights reserved.
13.
Project Jigsaw 8
Copyright © 2012 Akira Koyasu. Some rights reserved.
14.
Project Jigsaw
No more classpath 8 Copyright © 2012 Akira Koyasu. Some rights reserved.
15.
Project Jigsaw
No more classpath Escape from “JAR hell” Modular JDK 8 Copyright © 2012 Akira Koyasu. Some rights reserved.
16.
module-info.java
com.foo com.foo.Main module com.foo {} com.foo.Sub com.foo.util.Tool 9 Copyright © 2012 Akira Koyasu. Some rights reserved.
17.
requires
com.foo module com.foo { com.foo.Main requires org.bar; com.foo.Sub requires com.baz; } com.foo.util.Tool org.bar com.baz 10 Copyright © 2012 Akira Koyasu. Some rights reserved.
18.
@ version
module com.foo @ 1.0.0 { requires org.bar @ 1.2.0; com.foo requires com.baz @ 0.8-beta; } org.bar com.baz 11 Copyright © 2012 Akira Koyasu. Some rights reserved.
19.
permits
com.app module com.foo { permits com.app; requires org.bar; requires com.baz; com.foo } org.bar com.baz 12 Copyright © 2012 Akira Koyasu. Some rights reserved.
20.
permits
com.other com.app module com.foo { permits com.app; requires org.bar; requires com.baz; com.foo } org.bar com.baz 12 Copyright © 2012 Akira Koyasu. Some rights reserved.
21.
permits
com.other com.app module com.foo { permits com.app; requires org.bar; requires com.baz; com.foo } org.bar com.baz 12 Copyright © 2012 Akira Koyasu. Some rights reserved.
22.
optional
module com.foo { requires org.bar; requires com.baz; requires optional org.bar.extra; } com.foo org.bar.extra org.bar com.baz 13 Copyright © 2012 Akira Koyasu. Some rights reserved.
23.
optional
module com.foo { requires org.bar; requires com.baz; requires optional org.bar.extra; } com.foo org.bar.extra org.bar com.baz 13 Copyright © 2012 Akira Koyasu. Some rights reserved.
24.
provides
module com.app { requires com.foo.util; requires com.foo.db; } com.app module com.foo.lib { provides com.foo.util; provides com.foo.db; com.foo.lib } com.foo.lib.util com.foo.lib.db 14 Copyright © 2012 Akira Koyasu. Some rights reserved.
25.
jpkg
$ jpkg -m modules/com.foo jmod com.foo $ ls modules/ com.foo@1.0.0.jmod com.foo 15 Copyright © 2012 Akira Koyasu. Some rights reserved.
26.
jmod (1)
$ jmod -L mlib create $ jmod -L mlib install /path/to/com.foo@*.jmod /path/to/com.app@*.jmod $ jmod -L mlib ls com.app com.foo@1.0.0 com.app@0.8-beta $ java -L mlib -m com.app com.foo 16 Copyright © 2012 Akira Koyasu. Some rights reserved.
27.
jmod (2)
$ jmod add-repo http://jig.sfbay $ jmod install jdk.tools http://jig.sfbay jdk.tools@8.0.0.jmod jdk.jndi@8.0.0.jmod 17 Copyright © 2012 Akira Koyasu. Some rights reserved.
28.
JavaSE8
Project Jigsaw Project Lambda HotRockit Nashorn 18 Copyright © 2012 Akira Koyasu. Some rights reserved.
29.
Project Lambda 19
Copyright © 2012 Akira Koyasu. Some rights reserved.
30.
Project Lambda 19
! Copyright © 2012 Akira Koyasu. Some rights reserved.
31.
Project Lambda
! 19 Copyright © 2012 Akira Koyasu. Some rights reserved.
32.
Project Lambda
! Easy-to-use Parallel 19 Copyright © 2012 Akira Koyasu. Some rights reserved.
33.
Project Lambda
! Easy-to-use Parallel Reduce conceptual and syntactic GAP between Serial and Parallel expressions 19 Copyright © 2012 Akira Koyasu. Some rights reserved.
34.
class Student
public class Student { private int gradYear; private double score; public int getGradYear() { return gradYear; } public void setGradYear(int gradYear) { this.gradYear = gradYear; } public double getScore() { return score; } public void setScore(double score) { this.score = score; } } 20 Copyright © 2012 Akira Koyasu. Some rights reserved.
35.
Question 21
Copyright © 2012 Akira Koyasu. Some rights reserved.
36.
Question
Compute the highest score of the students graduated in 2011 21 Copyright © 2012 Akira Koyasu. Some rights reserved.
37.
Highest Score
with External Iteration List<Student> students = new ArrayList<>(); // ... double hightestScore = 0.0; for (Student s : students) { if (s.getGradYear() == 2011) { if (s.getScore() > hightestScore) { hightestScore = s.getScore(); } } } 22 Copyright © 2012 Akira Koyasu. Some rights reserved.
38.
Highest Score
with Internal Iteration SmartList<Student> students = new SmartList<>(); // ... double hightestScore = students .filter(new Predicate<Student>() { @Override public boolean eval(Student s) { return s.getGradYear() == 2011; }}) .map(new Mapper<Student, Double>() { @Override public Double map(Student s) { return s.getScore(); }}) .max(); 23 Copyright © 2012 Akira Koyasu. Some rights reserved.
39.
Highest Score
with Internal Iteration SmartList<Student> students = new SmartList<>(); // ... double hightestScore = students .filter(new Predicate<Student>() { @Override public boolean eval(Student s) { return s.getGradYear() == 2011; }}) .map(new Mapper<Student, Double>() { @Override public Double map(Student s) { return s.getScore(); }}) .max(); 23 Copyright © 2012 Akira Koyasu. Some rights reserved.
40.
with Lambdas
List<Student> students = new ArrayList<>(); // ... double hightestScore = students .filter((Student s) -> s.getGradYear() == 2011) .map((Student s) -> s.getScore()) .max(); 24 Copyright © 2012 Akira Koyasu. Some rights reserved.
41.
with Lambdas
and Parallelism List<Student> students = new ArrayList<>(); // ... double hightestScore = students .filter((Student s) -> s.getGradYear() == 2011) .map((Student s) -> s.getScore()) .max(); 24 Copyright © 2012 Akira Koyasu. Some rights reserved.
42.
with Lambdas
and Parallelism List<Student> students = new ArrayList<>(); // ... double hightestScore = students.parallel() .filter((Student s) -> s.getGradYear() == 2011) .map((Student s) -> s.getScore()) .max(); 24 Copyright © 2012 Akira Koyasu. Some rights reserved.
43.
the Points 25
Copyright © 2012 Akira Koyasu. Some rights reserved.
44.
the Points
Lambda Expression 25 Copyright © 2012 Akira Koyasu. Some rights reserved.
45.
the Points
Lambda Expression Default Method 25 Copyright © 2012 Akira Koyasu. Some rights reserved.
46.
the Points
Lambda Expression Default Method New Interface: ParallelIterable 25 Copyright © 2012 Akira Koyasu. Some rights reserved.
47.
Functional Interface 26
Copyright © 2012 Akira Koyasu. Some rights reserved.
48.
Functional Interface
Functional interface: 26 Copyright © 2012 Akira Koyasu. Some rights reserved.
49.
Functional Interface
Functional interface: Interface with one method 26 Copyright © 2012 Akira Koyasu. Some rights reserved.
50.
Functional Interface
Functional interface: Interface with one method java.util.Comparator<T> java.io.FileFilter java.lang.Runnable java.awt.event.ActionListener ... 26 Copyright © 2012 Akira Koyasu. Some rights reserved.
51.
Lambda Expression
Lambda Expression instantiates a fuctional interface 27 Copyright © 2012 Akira Koyasu. Some rights reserved.
52.
Lambda Expression
Lambda Expression instantiates a fuctional interface Comparator<String> c = (String x, String y) -> x.length() - y.length(); 27 Copyright © 2012 Akira Koyasu. Some rights reserved.
53.
Lambda Expression
Lambda Expression instantiates a fuctional interface Comparator<String> c = (String x, String y) -> x.length() - y.length(); Comparator<String> c = new Comparator<String>() { = @Override public int compare(String x, String y) { return x.length() - y.length(); }}; 27 Copyright © 2012 Akira Koyasu. Some rights reserved.
54.
Dilemma
Collections need new methods forEach reduce filter sorted map ... 28 Copyright © 2012 Akira Koyasu. Some rights reserved.
55.
Dilemma
Collections need new methods forEach reduce filter sorted map ... Compatibility? 28 Copyright © 2012 Akira Koyasu. Some rights reserved.
56.
Default Method 29
Copyright © 2012 Akira Koyasu. Some rights reserved.
57.
Default Method
Interface method with default implementation 29 Copyright © 2012 Akira Koyasu. Some rights reserved.
58.
Default Method
Interface method with default implementation public interface Iterable<T> { Iteratr<T> iterator(); Iterable<T> filter(Predicate<? super T> predicate) default { return Iterables.filter(this, predicate); } void forEach(Block<? super T> block) default { Iterables.forEach(this, block); } // ... } 29 Copyright © 2012 Akira Koyasu. Some rights reserved.
59.
New Interface:
ParallelIterable ParallelIterable has the same methods as Iterable, except in parallel. forEach reduce filter sorted map ... interface Collection<T> { Collection new method // ... ParallelIterable<T> parallel(); parallel() } 30 Copyright © 2012 Akira Koyasu. Some rights reserved.
60.
Method Reference
FileFilter filter = new FileFilter() { public boolean accept(File f) { return f.canRead(); } }; 31 Copyright © 2012 Akira Koyasu. Some rights reserved.
61.
Method Reference
FileFilter filter = new FileFilter() { public boolean accept(File f) { return f.canRead(); } }; FileFilter filter = (File f) -> f.canRead(); 31 Copyright © 2012 Akira Koyasu. Some rights reserved.
62.
Method Reference
FileFilter filter = new FileFilter() { public boolean accept(File f) { return f.canRead(); } }; FileFilter filter = (File f) -> f.canRead(); FileFilter filter = File#canRead; 31 Copyright © 2012 Akira Koyasu. Some rights reserved.
63.
Highest Score
with Lambdas List<Student> students = new ArrayList<>(); // ... double hightestScore = students.parallel() .filter(s -> s.getGradYear() == 2011) .map(Student#getScore()) .max(); 32 Copyright © 2012 Akira Koyasu. Some rights reserved.
64.
JavaSE8
Project Jigsaw Project Lambda HotRockit Nashorn 33 Copyright © 2012 Akira Koyasu. Some rights reserved.
65.
Oracle JVMs 34
Copyright © 2012 Akira Koyasu. Some rights reserved.
66.
Oracle JVMs
HotSpot from Sun 34 Copyright © 2012 Akira Koyasu. Some rights reserved.
67.
Oracle JVMs
JRockit HotSpot from BEA from Sun 34 Copyright © 2012 Akira Koyasu. Some rights reserved.
68.
Oracle JVMs
JRockit HotSpot from BEA from Sun 34 Copyright © 2012 Akira Koyasu. Some rights reserved.
69.
Oracle JVMs
JRockit HotSpot from BEA from Sun HotRockit 34 Copyright © 2012 Akira Koyasu. Some rights reserved.
70.
JRockit 35
Copyright © 2012 Akira Koyasu. Some rights reserved.
71.
JRockit
jcmd no Perm-Gen Mission Control Flight Recorder Deterministic GC 35 Copyright © 2012 Akira Koyasu. Some rights reserved.
72.
JRockit
jcmd no Perm-Gen Mission Control (Premium Feature) Flight Recorder (Premium Feature) Deterministic GC (Premium Feature) 35 Copyright © 2012 Akira Koyasu. Some rights reserved.
73.
JavaSE8
Project Jigsaw Project Lambda HotRockit Nashorn 36 Copyright © 2012 Akira Koyasu. Some rights reserved.
74.
Nashorn
New JavaScript Engine in JDK8 Compliance: ECMA-262 Edition 5 (Latest ECMAScript standard) JavaScript & Java call each other 37 Copyright © 2012 Akira Koyasu. Some rights reserved.
75.
Native on the
JVM AST/IR Java JavaScript Abstract Syntax Tree Intermediate Representation byte code InvokeDynamic uses MethodHandle 38 Copyright © 2012 Akira Koyasu. Some rights reserved.
76.
JavaEE7
Copyright © 2012 Akira Koyasu. Some rights reserved.
77.
JavaEE Roadmap
2009 2010 2011 2012 2013 2009/12/10 2013 Q2 JavaEE6 JavaEE7 Extensibility Provisioning Profile 2011/2/28 Elasticity Pruning Multi-tenancy Glassfish Orchestration Server 3.1 Clustering Glassfish Glassfish v3 JavaEE6 support Server 4 JavaEE7 support 40 Copyright © 2012 Akira Koyasu. Some rights reserved.
78.
Themes of JavaEE7
(from JSR 342) 41 Copyright © 2012 Akira Koyasu. Some rights reserved.
79.
Themes of JavaEE7
(from JSR 342) Cloud 41 Copyright © 2012 Akira Koyasu. Some rights reserved.
80.
JavaEE7
PaaS JAX-RS 2.0 JCache 42 Copyright © 2012 Akira Koyasu. Some rights reserved.
81.
Platform as a
Service the JavaEE7 Platform is a Service 43 Copyright © 2012 Akira Koyasu. Some rights reserved.
82.
[IPS]aaS
IaaS Infrastructure as a Service PaaS Platform as a Service SaaS Software as a Service 44 Copyright © 2012 Akira Koyasu. Some rights reserved.
83.
[IPS]aaS
IaaS Infrastructure as a Service PaaS Platform as a Service SaaS Software as a Service Application Middleware OS HW/NW 44 Copyright © 2012 Akira Koyasu. Some rights reserved.
84.
[IPS]aaS
IaaS Infrastructure as a Service PaaS Platform as a Service SaaS Software as a Service Application Application Middleware Middleware OS OS HW/NW HW/NW 44 Copyright © 2012 Akira Koyasu. Some rights reserved.
85.
[IPS]aaS
IaaS Infrastructure as a Service PaaS Platform as a Service SaaS Software as a Service Application Application Application Middleware Middleware Middleware OS OS OS HW/NW HW/NW HW/NW 44 Copyright © 2012 Akira Koyasu. Some rights reserved.
86.
Key Features 45
Copyright © 2012 Akira Koyasu. Some rights reserved.
87.
Key Features
Provisioning 45 Copyright © 2012 Akira Koyasu. Some rights reserved.
88.
Key Features
Provisioning Elasticity 45 Copyright © 2012 Akira Koyasu. Some rights reserved.
89.
Key Features
Provisioning Elasticity Multi-tenancy 45 Copyright © 2012 Akira Koyasu. Some rights reserved.
90.
Provisioning
Auto-Provision Services Application Cloud Administration Service Messaging LDAP Service Service Database Application Provision and Initialize Service Container Application Dependencies 46 Copyright © 2012 Akira Koyasu. Some rights reserved.
91.
Elasticity
Dynamic self-adjusting SLA driven Elasticity Node Node Node Node 47 Copyright © 2012 Akira Koyasu. Some rights reserved.
92.
Multi-tenancy
Shared Application, Shared Data Source Tenant 1 Tenant 2 Application Data Source Tenant 3 @TenantId 48 Copyright © 2012 Akira Koyasu. Some rights reserved.
93.
JavaEE7
PaaS JAX-RS 2.0 JCache 49 Copyright © 2012 Akira Koyasu. Some rights reserved.
94.
JAX-RS 2.0
javax.ws.rs JAX-RS Java API for RESTful web services version 1.1 is a part of JavaEE6 50 Copyright © 2012 Akira Koyasu. Some rights reserved.
95.
JAX-RS
Client Server Resource A Resource B 51 Copyright © 2012 Akira Koyasu. Some rights reserved.
96.
JAX-RS
GET Client POST Server PUT DELETE Resource A Resource B 51 Copyright © 2012 Akira Koyasu. Some rights reserved.
97.
JAX-RS
GET Client POST Server PUT DELETE Resource A text Resource json B xml byte-stream 51 Copyright © 2012 Akira Koyasu. Some rights reserved.
98.
JAX-RS
GET Client POST Server PUT Object DELETE Resource A A Object text Resource B json B xml byte-stream 51 Copyright © 2012 Akira Koyasu. Some rights reserved.
99.
Define a Resource
1.1 JAX-RS http://example.info/company/1234/employee?id=5678 52 Copyright © 2012 Akira Koyasu. Some rights reserved.
100.
Define a Resource
1.1 JAX-RS http://example.info/company/1234/employee?id=5678 @Path("/company/{companyId}") public class CompanyResource { @GET @Path("/employee") @Produces(MediaType.TEXT_PLAIN) public String employee( @PathParam("companyId") String companyId, @QueryParam("id") String employeeId) { return findEmployee(companyId, employeeId); } // ... } 52 Copyright © 2012 Akira Koyasu. Some rights reserved.
101.
What’s new in
JAX-RS 2.0 Client API Improved Conneg Filters & Interceptors Hypermedia Asynchrony Validation JSR-339: Early Draft Review 3 on 07 June, 2012 53 Copyright © 2012 Akira Koyasu. Some rights reserved.
102.
Client API
Client client = ClientFactory.newClient(); String employeeName = client .target("http://../campany/{campanyId}/employee") .pathParam("campanyId", "1234") .queryParam("id", "5678") .request(MediaType.TEXT_PLAIN) .get(String.class); 54 Copyright © 2012 Akira Koyasu. Some rights reserved.
103.
Filters
Resource A Resource B 55 Copyright © 2012 Akira Koyasu. Some rights reserved.
104.
Filters
Request Resource A Resource B 55 Copyright © 2012 Akira Koyasu. Some rights reserved.
105.
Filters
Request Resource A Response Resource B 55 Copyright © 2012 Akira Koyasu. Some rights reserved.
106.
Filters
Request Resource A Response Resource B 55 Copyright © 2012 Akira Koyasu. Some rights reserved.
107.
Filters
Request Resource A Response Resource B Response 55 Copyright © 2012 Akira Koyasu. Some rights reserved.
108.
Filters
Request PreMatchFilter (server side only) Filter 1 Resource A Response Resource B Response 55 Copyright © 2012 Akira Koyasu. Some rights reserved.
109.
Filters
Request PreMatchFilter (server side only) Filter 1 RequestFilter Filter 2 Filter 3 Resource A Response Filter 2 Filter 3 Resource B Response 55 Copyright © 2012 Akira Koyasu. Some rights reserved.
110.
Filters
Request PreMatchFilter (server side only) Filter 1 RequestFilter Filter 2 Filter 3 Resource A Response Filter 5 Filter 4 ResponseFilter Filter 2 Filter 3 Resource B Response 55 Copyright © 2012 Akira Koyasu. Some rights reserved.
111.
Interceptors
@Consumes ("application/widget+xml") MessageBodyReader <Widget> Resource A @Produces ("application/widget+xml") MessageBodyWriter <Widget> 56 Copyright © 2012 Akira Koyasu. Some rights reserved.
112.
Interceptors
Request @Consumes ("application/widget+xml") MessageBodyReader <Widget> Resource A @Produces ("application/widget+xml") MessageBodyWriter <Widget> 56 Copyright © 2012 Akira Koyasu. Some rights reserved.
113.
Interceptors
Request @Consumes ("application/widget+xml") MessageBodyReader <Widget> Widget Resource A @Produces ("application/widget+xml") MessageBodyWriter <Widget> 56 Copyright © 2012 Akira Koyasu. Some rights reserved.
114.
Interceptors
Request @Consumes ("application/widget+xml") MessageBodyReader <Widget> Widget Resource A @Produces ("application/widget+xml") MessageBodyWriter <Widget> Widget 56 Copyright © 2012 Akira Koyasu. Some rights reserved.
115.
Interceptors
Request @Consumes ("application/widget+xml") MessageBodyReader <Widget> Widget Resource A Response @Produces ("application/widget+xml") MessageBodyWriter <Widget> Widget 56 Copyright © 2012 Akira Koyasu. Some rights reserved.
116.
Interceptors
Request ReaderInterceptor <Widget> @Consumes ("application/widget+xml") MessageBodyReader <Widget> Widget Resource A Response WriterInterceptor @Produces <Widget> ("application/widget+xml") MessageBodyWriter <Widget> Widget 56 Copyright © 2012 Akira Koyasu. Some rights reserved.
117.
Asynchrony (server side)
Suspend & Resume connections javax.ws.rs.core.ExecutionContext @Path("/async/longRunning") public class MyResource { @Context ExecutionContext ctx; @GET @Produces("text/plain") public void longRunningOp() { Executors.newSingleThreadExecutor().submit(new Runnable() { public void run() { executeLongRunningOp(); ctx.resume("Hello async world!"); }}); ctx.suspend(); } } 57 Copyright © 2012 Akira Koyasu. Some rights reserved.
118.
Asynchrony (client side)
AsyncInvoker AsyncInvoker async = client .target("http://.../campany/{campanyId}/employee") .pathParam("campanyId", "1234") .queryParam("id", "5678") .request(MediaType.TEXT_PLAIN) .async(); // Future<Response> Future<Response> fresponse = async.get(); // InvocationCallback<T> Future<String> fstring = async.get(new InvocationCallback<String>(){ @Override public void completed(String response) { /* ... */ } @Override public void failed(ClientException error) { /* ... */ } }); 58 Copyright © 2012 Akira Koyasu. Some rights reserved.
119.
JavaEE7
PaaS JAX-RS 2.0 JCache 59 Copyright © 2012 Akira Koyasu. Some rights reserved.
120.
JCache
javax.cache Standard Caching API 60 Copyright © 2012 Akira Koyasu. Some rights reserved.
121.
JCache
javax.cache Standard Caching API Expiration Mutual exclusion Spooling Consistency 60 Copyright © 2012 Akira Koyasu. Some rights reserved.
122.
Basic Use
CacheManager cacheManager = Caching.getCacheManager(); Cache<Integer, String> cache = cacheManager.getCache("example"); if (cache == null) { cache = cacheManager .<Integer, String>createCacheBuilder("example") .setExpiry(ExpiryType.MODIFIED, new Duration(TimeUnit.SECONDS, 300L)) .build(); } Integer key = Integer.valueOf(1); String value = "val1"; cache.put(key, value); String value2 = cache.get(key); 61 Copyright © 2012 Akira Koyasu. Some rights reserved.
123.
Atomic Operation
cache.getAndRemove(key); cache.getAndReplace(key, value2); cache.putIfAbsent(key, value); cache.replace(key, value); cache.replace(key, value, value2); 62 Copyright © 2012 Akira Koyasu. Some rights reserved.
124.
Annotation
@CacheDefaults(cacheName="myScheduler") public class MyScheduler { @CachePut public void create( @CacheKeyParam String id, @CacheValue Schedule schedule) { /* ... */ } @CacheResult public Schedule get(String id) { /* ... */ } @CacheRemoveEntry public void remove(String id) { /* ... */ } } 63 Copyright © 2012 Akira Koyasu. Some rights reserved.
125.
Conclusion
Copyright © 2012 Akira Koyasu. Some rights reserved.
126.
Conclusion 65
Copyright © 2012 Akira Koyasu. Some rights reserved.
127.
Conclusion
Revolution is coming, Don’t miss it! 65 Copyright © 2012 Akira Koyasu. Some rights reserved.
128.
JavaOne 2012
Sept 30-Oct 4 66 Copyright © 2012 Akira Koyasu. Some rights reserved.
129.
Notes
This work is licensed under the Creative Commons Attribution-NonCommercial 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/ licenses/by-nc/3.0/. 67 Copyright © 2012 Akira Koyasu. Some rights reserved.
Editor's Notes
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Download now