Java SE
-
Upload
danielle-pena -
Category
Documents
-
view
24 -
download
1
description
Transcript of Java SE
![Page 1: Java SE](https://reader036.fdocuments.in/reader036/viewer/2022072015/56812fe8550346895d955e58/html5/thumbnails/1.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.1
Java SE
Simon RitterJava Technology Ambassador
@speakjava
![Page 2: Java SE](https://reader036.fdocuments.in/reader036/viewer/2022072015/56812fe8550346895d955e58/html5/thumbnails/2.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.2
JDK 8 in the works
• JDK 7 shipped in July 2011
• JDK 8 scheduled to ship in 2014• Expecting a 2-year cadence between platform releases going forward
• Java SE 8 platform under JSR 336
• Major features planned for JDK 8• Lambda expressions and default methods (JSR 335)
• Annotation-related language changes (JSR 308)
• Date and Time API (JSR 310)
• Compact Profiles
![Page 3: Java SE](https://reader036.fdocuments.in/reader036/viewer/2022072015/56812fe8550346895d955e58/html5/thumbnails/3.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.3
JDK 8
Java for Everyone• Profiles for constrained devices• JSR 310 - Date & Time APIs• Non-Gregorian calendars• Unicode 6.2• ResourceBundle. • BCP47 locale matching• Globalization & Accessibility
Innovation• Lambda aka Closures• Language Interop• Nashorn
Core Libraries• Parallel operations for core
collections APIs• Improvements in functionality• Improved type inference
Security• Limited doPrivilege• NSA Suite B algorithm support• SNI Server Side support• DSA updated to FIPS186-3• AEAD JSSE CipherSuites
Tools• Compiler control & logging• JSR 308 - Annotations on
Java Type• Native app bundling • App Store Bundling tools
Client• Deployment enhancements• JavaFX 8• Java SE Embedded support• Enhanced HTML5 support• 3D shapes and attributes• Printing
General Goodness• JVM enhancements• No PermGen limitations• Performance lmprovements
![Page 4: Java SE](https://reader036.fdocuments.in/reader036/viewer/2022072015/56812fe8550346895d955e58/html5/thumbnails/4.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.4
The road of closures in Java
• In 2006-2008, a vigorous community debate about closures• Multiple proposals, including BGGA , CICE, and FCM
• December 2009 – OpenJDK Project Lambda formed• November 2010 – JSR-335 filed
• Current status• Draft specification available
• Prototype (source and binary) available on OpenJDK
• Coming soon to mainline JDK 8 builds
![Page 5: Java SE](https://reader036.fdocuments.in/reader036/viewer/2022072015/56812fe8550346895d955e58/html5/thumbnails/5.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.5
Coordinated Platform Upgrade with Lambda
• Language• Lambda Expressions (closures)
• Interface Evolution with default methods
• Libraries• Bulk data operations on Collections
• More library support for parallelism
• JVM• Default methods
• Enhancements to invokedynamic
![Page 6: Java SE](https://reader036.fdocuments.in/reader036/viewer/2022072015/56812fe8550346895d955e58/html5/thumbnails/6.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.6
Let us look at some code
// Event handler for when things go terribly wrongfilterTask.setOnFailed(new EventHandler<WorkerStateEvent>() { @Override public void handle(WorkerStateEvent e) { e.getSource().getException().printStackTrace(); }});// Event handler for when things go terribly wrongfilterTask.setOnFailed(e -> e.getSource().getException().printStackTrace());
Robust error handling in a scheduling application
![Page 7: Java SE](https://reader036.fdocuments.in/reader036/viewer/2022072015/56812fe8550346895d955e58/html5/thumbnails/7.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.7
for (Shape s : shapes) { if (s.getColor() == BLUE) s.setColor(RED);}
shapes.forEach(s -> { if (s.getColor() == BLUE) s.setColor(RED);});
![Page 8: Java SE](https://reader036.fdocuments.in/reader036/viewer/2022072015/56812fe8550346895d955e58/html5/thumbnails/8.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.8
Extension Methods
interface Collection<T> { default void forEach(Block<T> action) { for (T t : this) action.apply(t); }
// Rest of Collection methods…}
![Page 9: Java SE](https://reader036.fdocuments.in/reader036/viewer/2022072015/56812fe8550346895d955e58/html5/thumbnails/9.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.9
Project Lambda
• Lambda expressions + extension methods allow:
• Internal iteration
• Bulk data operations for existing types
• Better support for parallelism leveraging fork/join
![Page 10: Java SE](https://reader036.fdocuments.in/reader036/viewer/2022072015/56812fe8550346895d955e58/html5/thumbnails/10.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.10
Project Nashorn
![Page 11: Java SE](https://reader036.fdocuments.in/reader036/viewer/2022072015/56812fe8550346895d955e58/html5/thumbnails/11.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.11
Test Pilots Wanted
• Developer Preview available• Schedule on: http://openjdk.java.net/projects/jdk8
• Contribute to OpenJFX: http://openjdk.java.net/projects/openjfx
• JDK 8 builds with many features already available• Try out Lambda and check out JavaFX 8: http://jdk8.java.net
• Participate in the JCP for free through your local JUG
• Jigsaw builds also available from Java.net