Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

New thing in JDK10 even that scala-er should know

231 views

Published on

JDK10

Published in: Engineering
  • Be the first to comment

  • Be the first to like this

New thing in JDK10 even that scala-er should know

  1. 1. New things in JDK 10 even that Scala-er should know Scala Matsuri 2018 2018/3/18 Naoki Kishida (@kis )
  2. 2. Self Introduction • Naoki Kishida – @kis – きしだのはてな • Live in Fukuoka • Server-side Java Developer at LINE Fukuoka • I will talk about JDK 10 on JJUG Night Seminar at 3/26, Tokyo.
  3. 3. JDK 10 will be released after 2 days • JDK 10 will be released 2018/3/20 – with new release cycle.
  4. 4. Java new release cycle. • Feature release every 6 months – March and September • Maintenance release every 3 months – April and July for March release – October and January for September release • Long Term Support every 3 years – The first LTS is JDK 11 • Oracle JDK will be for only Oracle Customer – Use OpenJDK instead.
  5. 5. Version number • 2018/03 Feature release JDK10 • 2018/04 Maintenance release JDK10.0.1 • 2018/07 Maintenance release JDK10.0.2 • 2018/09 Feature release JDK11 LTS • 2018/10 Maintenance release JDK11.0.1 LTS • 2019/01 Maintenance release JDK11.0.2 LTS
  6. 6. JDK 10 has 12 JEPs • JEP – Java Enhancement Proposal – Same as Scala Improvement process(SIP) http://openjdk.java.net/projects/jdk/10/
  7. 7. JEP Categories • For JDK Developer – 296: Consolidate the JDK Forest into a Single Repository – 304: Garbage-Collector Interface – 317: Experimental Java-Based JIT Compiler • For Java user – 286: Local-Variable Type Inference • Big thing for we Java developers • But you don’t use Java – No effect – 313: Remove the Native-Header Generation Tool(javah)
  8. 8. JEP Categories • For JVM user – 307: Parallel Full GC for G1 – 310: Application Class-Data Sharing – 312: Thread-Local Handshakes – 314: Additional Unicode Language-Tag Extentions – 316: Heap Allocation on Alternative Memory Devices – 319: Root Certificates – 322: Time-Based Release Versioning
  9. 9. 304: Garbage-Collector Integace • GC is modularized. • There are many GCs that will come. – Epsilon GC – ZGC – Shenandoah • Not to control GC by user code
  10. 10. 317: Experimental Java-Based JIT Compiler • Project Metoropolis – java-on-java • We can write JVM even with Scala? – There is a possibility.
  11. 11. 286: Local-Variable Type Inferences • var list = new ArrayList<String>() • `var` is not a keyword – but a special type • We can use `var` as a variable name • We can use `var` as a method name • We can not use `var` as a class name
  12. 12. 307: Parallel Full GC for G1 • G1GC had been the default GC on JDK 9 • Full GC for G1 was not parallel. • Until JDK 8, Parallel GC was the default • To smooth migration, Full GC for G1GC also parallelize. • But full GC should not occur. – Ideally, it has no effect for us.
  13. 13. 310: Application Class-Data Sharing • CDS for system class is introduced in JDK 5 • Share class data between multiple JVM on the same machine – startup performance – reduce the resource footprint • JDK 10 allow to use CDS for application class
  14. 14. 312: Thread-Local Handshakes • JVM can stop an individual thread – stop not just all thread
  15. 15. 314: Additional Unicode Language-Tag Extentions • Enhance java.util.Locale • additional Unicode extensions of BCP 47 language tag – currency type – the first day of the week – region override – time zone
  16. 16. 316: Heap Allocation on Alternative Memory Devices • Now we can use non-volatile RAM(不揮発性メ モリ) such as 3D XPoint • This will enable the JVM to use different types of memory system
  17. 17. 319: Root Certificates • OpenJDK doesn’t have Root Certificates so far • Oracle JDK have had it. • To smooth migration, OpenJDK have had it.
  18. 18. API Changes • java.io.Reader – long transferTo(Writer) • java.lang.mainagement.RuntimeMXBean – long getPid() • java.util.List/Map/Set – copyOf(Collection) • java.util.stream.Collectors – toUnmodifiableList/Set/Map
  19. 19. Docker aware • Until JDK 9, JVM use the platform CPU count/Memory size even if it is running on Docker. • JDK 10, JVM can use Docker setting for CPU count/ Memory size if it is running on Docker. • VM Options – -XX:InitialRAMPercentage – -XX:MaxRAMPercentage – -XX:MinRAMPercentage
  20. 20. Other Changes • Kerberos configuration file krb5.conf include *.conf in INCLUDEDIR • -d32 and –d64 has been removed • new JavaDoc tag. {@summary} • policytool has been removed • XMLInputFactory.newFactory() has been “de- deplicated” – it had been deplicated by mistake.
  21. 21. What’s next? • JDK 11 JEPs so far. – 309: Dynamic Class-File Constants – 318: Epsilon: An Arbitarily Low-Overhead Garbage Collector – 320: Remove the Java EE and CORBA Modules – 323: Local-Variable Syntax for Lambda Parameters
  22. 22. References • JDK 10 – http://openjdk.java.net/projects/jdk/10 • 109 New Features In JDK 10 - Azul Systems, Inc. – https://www.azul.com/109-new-features-in-jdk-10/ • Java 10新機能まとめ - Qiita – https://qiita.com/nowokay/items/d9bc4b3f715d17c2 830d • Better containerized JVMs in JDK 10 - JAXenter – https://jaxenter.com/better-containerized-jvms-jdk- 10-140593.html

×
Save this presentationTap To Close