Post on 11-May-2015
description
transcript
JDK 8 and JDK 8 Updates in OpenJDK
1 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
OpenJDK
Wolfgang Weigend
Sen. Leitender Systemberater
Java Technologie und Architektur
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
2 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
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.
OpenJDK in a Nutshell
“The place to collaborate on an open-source
implementation of the Java Platform, Standard
Edition, and related projects.”
3 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Edition, and related projects.”
Groups and Projects
4 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Group
Project
Groups
OpenJDK
Governing Board Porters
PowerPC/
AIX
5 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
OpenJDK
Members
Build
JDK9
Permanent Group
JDK8u
BSD PortMac OSX
Roles of OpenJDK Participation
• Participant
– Making minor contributions
• Contributor
– Signed agreement, making
Participant
6 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
– Signed agreement, making
non-trivial changes
• OpenJDK Member
– Senior role, may propose
new Groups, Projects and
Members
OpenJDK
Members
Contributor
Roles of Groups
• Group Member
– An elected OpenJDK
Contributor
• Group Lead
7 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• Group Lead
– An OpenJDK Member
appointed by the GB
– Reports on group work
– Can sponsor projects
Group Member
Group Lead
Roles of OpenJDK Projects
• Author
– Can create code changes
• Committer
– Can check in code changes
Reviewer
8 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
– Can check in code changes
• Reviewer
– Can approve code changes
• Project LeadAuthor
Committer Project Lead
Community Engagement
Non-complex bugs, review, test portingIntermediate
Advanced Solving non-trivial bugs
9 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Fix build warnings, trivial bugs, test and report regressions
Starter
• Messages per Month and the mailing lists
OpenJDK 8 - MarkMail search
10 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JDK 8 Update Informations
• All information about JDK 8 Update Releaseshttp://openjdk.java.net/projects/jdk8u/
• Send bug reports - Report a Bug or Request a Feature http://bugreport.java.com/bugreport/
• Track bug reports - Tracking Your Issues In The JDK Bug System
11 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• Track bug reports - Tracking Your Issues In The JDK Bug Systemhttps://robilad.livejournal.com/139637.html
• How to contribute and Submit a patchhttp://openjdk.java.net/contribute/
• Nominating a Contributor or Author to be a Committerhttp://openjdk.java.net/projects/#project-committer
JDK Enhancement Proposal’s (JEP’s)
• Regularly updated list of proposals
– Serve as the long-term roadmap for JDK release projects
– Roadmap extends for at least three years
• Uniform format and a central archive for enhancement proposals
– Interested parties can find, read, comment, and contribute
• Process is open to every OpenJDK Committer
12 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• Process is open to every OpenJDK Committer
• Enhancement is a non-trivial change to the JDK code base
– Two or more weeks of engineering effort
– significant change to JDK or development processes and infrastructure
– High demand from developers or customers
• JDK Enhancement-Proposal & Roadmap Processhttp://openjdk.java.net/jeps/1
Java SE 8 Reference Implementations
• Available at https://jdk8.java.net/java-se-8-ri/
• Based solely upon open source code from JDK 8 Project in OpenJDK
– RI binaries source code available under the GPLv2 in a single zip file (118 MB)
• Binaries provided
– Oracle Linux 6.1 x64 Java Development Kit (154 MB)
– Windows 7 i586 Java Development Kit (90.1 MB)
13 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
– Windows 7 i586 Java Development Kit (90.1 MB)
– Oracle Linux 6.1 i586 (for Compact Profiles) JRE, see JEP 161 Compact Profiles
• Binaries provided primarily for use by implementor’s of the Java SE 8 Platform Specification
• Recommended for reference purposes only
• Reference Implementations have been approved by the JCP
• They will receive no updates, not even for security issues
• RI Binaries under the GNU General Public License version 2
– and under the Oracle Binary Code License
JDK 8 Updates Project in OpenJDK
• Oracle JDK 8 Updates based on an OpenJDK Project
• Web Site: http://openjdk.java.net/projects/jdk8u
• Information on developers and development processes
• Q & A and status updates
14 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• Q & A and status updates
• Sources: http://hg.openjdk.java.net/jdk8u/jdk8u
• Master forest: jdk8u/jdk8u
• Development forest: http://hg.openjdk.java.net/jdk8u/jdk8u-dev
• Mailing list: jdk8u-dev@openjdk.java.net
14
OpenJDK - 11105 Commits in 12 Months
15 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Source: http://www.ohloh.net/p/openjdk/commits/summary
JDK 8Innovation• Lambda JSR 335
• Language Interoperability
• Nashorn
Core Libraries• Parallel operations for core collections API‘s
Java for Everyone• Profiles for constrained devices
• JSR 310 – Date & Time API‘s
• Non-Gregorian calendars
• Unicode 6.1
• ResourceBundle
• BCP47 locale matching
Client• Deployment enhancements
• JavaFX 8
• Public UI Control API
• Java SE Embedded support
• Enhanced HTML5 support
• 3D shapes and attributes
16 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• Parallel operations for core collections API‘s
• Improvements in functionality
• Improved type inference
General Goodness• JVM enhancements
• No PermGen limitations
• Performance Improvements
• BCP47 locale matching
• Globalization & Accessibility
Tools• Compiler control & logging
• JSR 308 – Annotations on Java Type
• Native app bundling
• App Store Bundling tools
• 3D shapes and attributes
• Printing
Security• Limited doPriviledge
• NSA Suite B algorithm support
• SNI Server Side support
• DSA update to FIPS186-3
• AEAD JSSE CipherSuites
Lambda Expression JSR-335
• Functional Interfaces: “An interface with one method”
• Gehört zum Sprachumfang von Java SE 8
− Final Release Specification
file:///C:/Java/jsr335-final/index.html
− http://www.oracle.com/technetwork/java/javase/downloads/index.html
17 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
− http://www.oracle.com/technetwork/java/javase/downloads/index.html
• Lambda Expressions (closures)
/* (int x, int y) {return x+y; } */
• Parameter Liste → -> Operator → Expression od. Statements
(String x) -> {return !x.isEmpty();}
• Was hergeleitet werden kann, kann auch weggelassen werden
x -> !x.isEmpty()
Extension Methods
• Provide a mechanism to add new methods to existing interfaces– Without breaking backwards compatibility
– Gives Java multiple inheritance of behaviour, as well as types
• but not state!
18 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
public interface Set<T> extends Collection<T> {
public int size();
... // The rest of the existing Set methods
public T reduce(Reducer<T> r)
default Collections.<T>setReducer;
}
List<Student> students = new ArrayList<>(...);
...
double highestScore =
students.parallelStream()
.filter(s -> s.getGradYear() == 2013)
.map(s -> s.getScore())
.reduce(0.0, Integer::max);
Lambda Expressions – ParallelState of the Lambda Libraries Edition
19 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
.reduce(0.0, Integer::max);
− More readable
− Better abstraction
− No reliance on mutable state
− Runs in parallel
− Works on any data structure that knows how to subdivide itself
� Concurrent Bulk Data Operations in Java collections API’s (JEP 107)
− filter/map/reduce
Java Mission Control 5.3
20 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• Information gathering− Instrumentation calls all over the JVM
− Application information via Java API
• Collected in Thread Local buffers⇢ Global Buffers ⇢Disk
Java Flight Recorder – How is it built?
21 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
⇢ Global Buffers ⇢Disk
• Binary, proprietary file format
• Managed via JMX
• Java Flight Recorder− Start from JMC 5.3 or CLI
• Activate Flight Recorder− -XX: +UnlockCommercialFeatures
− -XX: +FlightRecorder
JavaFX via Open Source in JDK 8
Open Source
�OpenJFX Project under
OpenJDK�
Converged
�Common license with
Java SE�
Standardization
�Oracle committed to
JavaFX standardization�
22 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
OpenJDK
�First phase to focus on
UI Controls
�
�
Java SE
�JavaFX included in
Java SE with JDK 8
�JavaFX for Java SE
Embedded (ARM)
�
�
JavaFX standardization
�JSR to be submitted
through JCP
�
�
JavaFX goes Open SourceiOS- and Android-Implementations
• iOS- and Android-Implementions are Open Source• Licensing with an own Application-Co-Bundle
23 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Compact-Profiles
RI Binaries under the GNU General Public License version 2 andunder the Oracle Binary Code License
• Compact Profile 1 (13.8 MB)
24 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• Compact Profile 1 (13.8 MB)
• Compact Profile 2 (17.5 MB)
• Compact Profile 3 (19.5 MB)
Compact-Profiles and Packages
Compact1 Profil Compact2 Profil Compact3 Profil Vollständige JRE
java.lang java.sql java.lang.management java.applet
java.io jvax.sql javax.management java.awt
java.nio javax.xml javax.naming java.beans
java.text org.w3c.dom java.sql.rowset javax.activity
java.math org.xml.sax javax.security.auth.kerberos javax.rmi
java.net java.rmi org.ietf.jgss javax.rmi.CORBA
javax.net javax.rmi javax.script org.omg
25 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
javax.net javax.rmi javax.script org.omg
java.util javax.transaction javax.xml.crypto javax.accessibility
java.util.logging java.util.prefs javax.imagio
java.security javax.security.sasl javax.print
javax.crypto javax.security.acl javax.sound
javax.security javax.lang.instrument javax.swing
javax.annotation.processing javax.activation
javax.lang.model javax.jws
javax.lang.model.element
javax.lang.model.type
javax.lang.model.util
javax.tools
javax.xml.bind
javax.xml.soap
javax.xml.ws
javax.annotation
Compact-Profile – New Option for „javac“
• New “javac” option
‒ javac -target 8 -profile Profile
‒ The javac compiler will verify java code against APIs available in profile
‒ $ javac -profile compact1 Hello.java
• New “jar” option
26 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• New “jar” option
‒ jar -profile Profile
‒ Marks jar file with minimum required profile
‒ Main application jar file defines default minimum profile
• Runtime verification of profile
‒ jar files will be validated at startup to ensure minimum profile is running
• “java -version” will report active profile
Project Nashorn• Lightweight, high-performance JavaScript engine
− Integrated into JRE
• ECMAScript 5.1 compliant JavaScript that runs on the JVM
− Accessible via javax.script API or jjs command line
27 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
• Replacement for Rhino
• Exploits JSR-292 via Dynalink
• Fully part of the OpenJDK
• Available on Java SE and Java ME
• Nashorn - Der Weg zur polyglotten VM
Project Nashorn Performance‒Test app executes Esprima parser and tokenizer� bitbucket.org/ariya/nashorn-speedtest
‒Rhino gets the first chance, Nashorn follows right after, each engine gets 30 runs� In the beginning, Rhino’s first run is 2607 ms and slowly it speeds up and finally this parsing is completed in just 824 ms
‒Nashorn timings have a different characteristic� When it is cold, Nashorn initially takes 5328 ms to carry out the operation but it quickly picks up the pace and imediate, it starts moving full steam ahead, reaching 208 ms per run
‒Nashorn compiles JavaScript code into Java bytecodes and run them on the JVM itself
28 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
‒Nashorn compiles JavaScript code into Java bytecodes and run them on the JVM itself� Nashorn is taking advantage of invokedynamic instruction to permit "efficient and flexible execution" in a dynamic environment such as JavaScript
mytext
Java SE RoadmapJDK 9• Jigsaw
• Interoperability
• Optimizations
• Cloud
• Ease of Use
• JavaFX JSR
JDK 7u40/45/51/55
• Java Flight Recorder
in JDK
• Native Memory
Tracking
• Java Discovery
Protocol
• App Store Packaging
Tools
JDK 8 GA18th of March 2014• Lambda
• Complete JVM Convergence
• JavaScript Interoperability
• JavaFX 8
− Public UI Control API
− Java SE Embedded support
− Enhanced HTML5 support
JDK 8.1 Q3 2014
• Deterministic G1
• JMC 6
• Improved JRE
installer
• Japp bundling
enhancements
JDK 7u21• Java Client
Security
Enhancements
JDK 8.2
29 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
2013 2014
NetBeans IDE 9
• JDK 9 support
• Scene Builder 3.0 support
Scene Builder 3.0
• JavaFX 9 support
2016
• Scene Builder support
NetBeans IDE 7.3
• New hints and refactoring
• Scene Builder support
Tools
NetBeans IDE 8
• JDK 8 support
• Scene Builder 2.0 support
Scene Builder 2.0
• JavaFX 8 support
• Enhanced Java IDE support
Scene Builder 1.1
• Linux support
2015
JDK 8u20 - OpenJDK 8u20 Release• General bug fixes to improve and enhance the OpenJDK 8u releases
• Schedules are subject to change
• Best efforts are made to keep this page updated with most recent information. Only
critical fixes will be considered for integration in the weeks leading up to the GA milestone
• The code freeze dates are usually one week before the milestone. Exact dates and a
30 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
8u-dev forests are opened January 2014
Feature Complete March 2014
Rampdown 1 April 2014
RampDown 2 June 2014
GA, Fork for the stabilization forests August 2014
• The code freeze dates are usually one week before the milestone. Exact dates and a
heads up will be sent to the mailing list when a milestone is approaching
Summary
• Java SE 8 with lots of new functionality– Language
– Libraries
– JVM
31 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
– JVM
• Java evolves continuously– jdk8.java.net
– www.jcp.org
– openjdk.java.net/jeps
Thanks!
Wolfgang.Weigend@oracle.com
Twitter: @wolflook
32 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.