Upgrading Past Java 9 Sounds Scary and I dont want to pay for Java - - PowerPoint PPT Presentation

upgrading past java 9 sounds scary
SMART_READER_LITE
LIVE PREVIEW

Upgrading Past Java 9 Sounds Scary and I dont want to pay for Java - - PowerPoint PPT Presentation

Upgrading Past Java 9 Sounds Scary and I dont want to pay for Java Super happy with Java 8, Super happy with Java 8, thanks thanks Starting with Java 11, Oracle will provide JDK releases under the open source GNU General Public License


slide-1
SLIDE 1
slide-2
SLIDE 2

Upgrading Past Java 9 Sounds Scary

…and I don’t want to pay for Java

slide-3
SLIDE 3

Super happy with Java 8, Super happy with Java 8, thanks thanks

slide-4
SLIDE 4
slide-5
SLIDE 5
slide-6
SLIDE 6
slide-7
SLIDE 7
slide-8
SLIDE 8
slide-9
SLIDE 9
slide-10
SLIDE 10
slide-11
SLIDE 11
slide-12
SLIDE 12

Starting with Java 11, Oracle will provide JDK releases under the open source GNU General Public License v2, with the Classpath Exception (GPLv2+CPE), and under a commercial license for those using the Oracle JDK as part of an Oracle product or service, or who do not wish to use open source software. This… replaces the historical “BCL” license, which had a combination of free and paid commercial terms.

Donald Smith, Sr. Director of Product Management (June 2018)

https://blogs.oracle.com/java-platform-group/oracle-jdk-releases- for-java-11-and-later

slide-13
SLIDE 13

That sounds frightening, and overly

  • complicated. Talk us through it.

The Lego Batman Movie

slide-14
SLIDE 14

That sounds frightening, and overly

  • complicated. Talk us through it.

The Lego Batman Movie

slide-15
SLIDE 15

https://flic.kr/p/8xhk74

slide-16
SLIDE 16

From Java 11 forward, Oracle JDK builds and OpenJDK builds will be essentially identical.

Donald Smith, Sr. Director of Product Management (Sept 2018)

https://blogs.oracle.com/java-platform-group/oracle-jdk-releases- for-java-11-and-later

slide-17
SLIDE 17

https://blog.joda.org/2018/09/time-to-look-beyond-oracles-jdk.html

slide-18
SLIDE 18
slide-19
SLIDE 19
slide-20
SLIDE 20

https://adoptopenjdk.net

slide-21
SLIDE 21

https://adoptopenjdk.net/support.html

slide-22
SLIDE 22
slide-23
SLIDE 23

Language features Language features

slide-24
SLIDE 24

JShell

slide-25
SLIDE 25

JShell

slide-26
SLIDE 26

JShell

slide-27
SLIDE 27

var

slide-28
SLIDE 28

var

slide-29
SLIDE 29

var

slide-30
SLIDE 30

var

slide-31
SLIDE 31

var

slide-32
SLIDE 32

var

slide-33
SLIDE 33

Convenience Factory Methods for Collections

slide-34
SLIDE 34

Convenience Factory Methods for Collections

slide-35
SLIDE 35

Convenience Factory Methods for Collections

slide-36
SLIDE 36

Convenience Factory Methods for Collections

slide-37
SLIDE 37

Collecting to Unmodifable Collections

items.stream() .filter(Objects::nonNull) .map(Object::toString) .collect(Collectors.toUnmodifiableList());

slide-38
SLIDE 38

New Methods on Stream API

items.stream() .takeWhile(user -> user.count() < maxCount) .forEach(user -> position.incrementAndGet());

slide-39
SLIDE 39

Predicate.not()

slide-40
SLIDE 40

New Methods on Optional

slide-41
SLIDE 41

Http Client

@tddmonkey

slide-42
SLIDE 42

Multi Release Jar Files

slide-43
SLIDE 43

Jigsaw

slide-44
SLIDE 44

Java Module System

slide-45
SLIDE 45

Java Module System

slide-46
SLIDE 46

JLink

slide-47
SLIDE 47

And in the future?

slide-48
SLIDE 48

Java 12: Switch expressions

slide-49
SLIDE 49
  • JEP 302: Lambda Leftovers (including underscore for

param)

  • JEP 305: Pattern Matching (Preview)
  • Data Classes for Java
  • Project Amber
  • Valhalla
  • Loom

And in the future?

slide-50
SLIDE 50
slide-51
SLIDE 51

Performance

slide-52
SLIDE 52

Memory Usage

slide-53
SLIDE 53
  • Java 9: JEP 248: G1 the Default GC
  • Java 10: JEP 307: Parallel Full GC for G1
  • Java 11: JEP 318: Epsilon (Experimental)
  • Java 11: JEP 333: ZGC (Experimental)

Garbage Collectors

slide-54
SLIDE 54
  • Java 9: JEP 248: G1 the Default GC
  • Java 10: JEP 307: Parallel Full GC for G1
  • Java 11: JEP 318: Epsilon (Experimental)
  • Java 11: JEP 333: ZGC (Experimental)
  • Java 12: JEP 189: Shenandoah (Experimental)
  • Java 12: More Updates to G1
  • Java 12: More Improvements to ZGC

Garbage Collectors

slide-55
SLIDE 55

Cost Cost

£$€

slide-56
SLIDE 56

Catch the 6 month release train

slide-57
SLIDE 57

If It Hurts, Do It More Frequently, and Bring the Pain Forward

An idea from Extreme Programming (XP)

Continuous Delivery – Jez Humble & Dave Farley

slide-58
SLIDE 58
slide-59
SLIDE 59

Modularity? Modularity?

slide-60
SLIDE 60

Miss Missing ing class classes / es / methods methods

slide-61
SLIDE 61
slide-62
SLIDE 62

Run on updated JDK Run on updated JDK

It might “just work”

slide-63
SLIDE 63

Address Address compiler compiler warnings warnings

…they are there for a reason

slide-64
SLIDE 64

Update your dependencies Update your dependencies

And add new ones

slide-65
SLIDE 65

Update your build Update your build tool tool

Maven and Gradle work with Java 12

slide-66
SLIDE 66

Compile Compile against updated against updated JDK JDK

…and start using the shiny new features

slide-67
SLIDE 67
slide-68
SLIDE 68

Java Is Changing Java Is Changing

…fast

slide-69
SLIDE 69

Modern Jav Modern Java a Can Help Can Help You You

Performance, cost, maintenance…

slide-70
SLIDE 70

Upgrade Now Upgrade Now And Reduce Future And Reduce Future Pain Pain

…and keep upgrading, at least in CI

slide-71
SLIDE 71