[{"data":1,"prerenderedAt":247},["ShallowReactive",2],{"page-en-\u002Fblog\u002Fjava-11-12-13-and-beyond":3,"related-en-\u002Fblog\u002Fjava-11-12-13-and-beyond":223},{"id":4,"title":5,"body":6,"date":211,"description":212,"extension":213,"meta":214,"navigation":215,"path":216,"seo":217,"stem":218,"tags":219,"translation":221,"__hash__":222},"pages_en\u002Fen\u002Fblog\u002Fjava-11-12-13-and-beyond.md","Java 11-12-13 and Beyond",{"type":7,"value":8,"toc":204},"minimark",[9,13,29,32,37,40,46,49,53,56,73,88,102,106,119,126,133,144,150,156,168,174,178,181,184,187,189,192],[10,11,12],"p",{},"Hello, Java 11 brings important changes to the life of everyone who uses Java. I'll talk about them in this post.\nThe JDK (Java Development Kit) will now be updated every 6 months — in March and September each year. What we call LTS (Long Term Support) releases will come out every 3 years.",[14,15,16,20,23,26],"ul",{},[17,18,19],"li",{},"September 2018 – Java 11",[17,21,22],{},"September 2021 – Java 17",[17,24,25],{},"September 2024 – Java 23",[17,27,28],{},"… and so on",[10,30,31],{},"And of course, those who pay can keep getting support beyond 3 years 🙂",[33,34,36],"h2",{"id":35},"licensing-oracle-jdk-open-jdk","Licensing – Oracle JDK & Open JDK",[10,38,39],{},"With Java 11 we now have the concepts of Oracle JDK and Open JDK. From now on",[41,42,43],"blockquote",{},[10,44,45],{},"Oracle JDK – Oracle Binary Code License Aggrement\nOpen JDK – GPL2",[10,47,48],{},"licenses will be part of our lives. GPL2 is fully open source and free. The Oracle Binary Code License is free while developing but will be paid in production environments.",[33,50,52],{"id":51},"deprecated-and-removed-items","Deprecated and Removed Items",[10,54,55],{},"The following Enterprise APIs were removed from the JDK.",[14,57,58,61,64,67,70],{},[17,59,60],{},"JAXB – xml binding",[17,62,63],{},"JAX-WS – xml web services and endpoint technology",[17,65,66],{},"CORBA – distributed object technology",[17,68,69],{},"JTA – java transaction api",[17,71,72],{},"JavaBeans Activation",[10,74,75,76,82,83],{},"Details here; ",[77,78,79],"a",{"href":79,"rel":80},"https:\u002F\u002Fopenjdk.java.net\u002Fjeps\u002F320",[81],"nofollow","\nAlso the destroy() and stop(Throwable obj) methods were removed from the Thread class.\nJDK 10 – ",[77,84,87],{"href":85,"rel":86},"https:\u002F\u002Fdocs.oracle.com\u002Fjavase\u002F10\u002Fdocs\u002Fapi\u002Fjava\u002Flang\u002FThread.html",[81],"Thread",[10,89,90,91,95,96,101],{},"JDK 11 – ",[77,92,87],{"href":93,"rel":94},"https:\u002F\u002Fdocs.oracle.com\u002Fen\u002Fjava\u002Fjavase\u002F11\u002Fdocs\u002Fapi\u002Fjava.base\u002Fjava\u002Flang\u002FThread.html",[81],"\nJavaFX was taken out of the JDK and turned into a separate library named ",[77,97,100],{"href":98,"rel":99},"https:\u002F\u002Fopenjfx.io\u002F",[81],"OpenJFX",".",[33,103,105],{"id":104},"language-and-library-novelties","Language and Library Novelties",[10,107,108,109,114],{},"The HttpClient class, which existed experimentally in JDK 9 and 10 for sending HTTP requests and reading responses, is now live. Since it offers HTTP\u002F2 support, it's a reason to move to Java 11 for most new projects 🙂 I've added the API links below.\n",[110,111],"img",{"alt":112,"src":113},"","\u002Fimages\u002Fjava-11-12-13-and-beyond-httpclient-1024x422.png",[77,115,118],{"href":116,"rel":117},"https:\u002F\u002Fdocs.oracle.com\u002Fen\u002Fjava\u002Fjavase\u002F11\u002Fdocs\u002Fapi\u002Fjava.net.http\u002Fjava\u002Fnet\u002Fhttp\u002FHttpClient.html",[81],"HttpClient API",[10,120,121],{},[77,122,125],{"href":123,"rel":124},"https:\u002F\u002Fdocs.oracle.com\u002Fen\u002Fjava\u002Fjavase\u002F11\u002Fdocs\u002Fapi\u002Fjava.net.http\u002Fjava\u002Fnet\u002Fhttp\u002FHttpRequest.html",[81],"HttpRequest API",[10,127,128],{},[77,129,132],{"href":130,"rel":131},"https:\u002F\u002Fdocs.oracle.com\u002Fen\u002Fjava\u002Fjavase\u002F11\u002Fdocs\u002Fapi\u002Fjava.net.http\u002Fjava\u002Fnet\u002Fhttp\u002FHttpResponse.html",[81],"HttpResponse API",[10,134,135,136,139,143],{},"New handy methods were added to the String class.\n",[110,137],{"alt":112,"src":138},"\u002Fimages\u002Fjava-11-12-13-and-beyond-string-246x300.png",[140,141,142],"strong",{},"repeat","() – to repeat a string",[10,145,146,149],{},[140,147,148],{},"isBlank","() – checks whether a string is blank",[10,151,152,155],{},[140,153,154],{},"strip","() – unlike trim(), cleans whitespace characters at the start and end of a string including Unicode characters",[10,157,158,161,162,167],{},[140,159,160],{},"lines","() – lets us get the lines inside a string split on \"\\r\\n\" (line feed and carriage return characters) as a stream\nAlso the ",[77,163,166],{"href":164,"rel":165},"https:\u002F\u002Fdocs.oracle.com\u002Fen\u002Fjava\u002Fjavase\u002F11\u002Fdocs\u002Fapi\u002Fjava.base\u002Fjava\u002Fnio\u002Ffile\u002FFiles.html",[81],"Files"," class got the following new methods;",[10,169,170,173],{},[110,171],{"alt":112,"src":172},"\u002Fimages\u002Fjava-11-12-13-and-beyond-files.png","Unicode 10 support also comes with JDK 11.\nI only wrote the ones I think I'll use the most here. I'm adding the full list at the bottom of the post.",[33,175,177],{"id":176},"performance-and-security-improvements","Performance and Security Improvements",[10,179,180],{},"With the G1 Garbage Collector, Java 11 shows 60% better performance than Java 8. That means we can get better performance just by upgrading to Java 11 without changing any of our code.\nTwo new GCs were also added: Epsilon GC and Z GC. Both are still experimental.\nEpsilon Garbage Collector can be used for performance measurement; it can be enabled with the parameters below.",[10,182,183],{},"XX:+UnlockExperimentalVMOptions",[10,185,186],{},"XX:+UseEpsilonGC\nZ Garbage Collector allows scaling to multi-terabyte heaps. It only works on 64-bit Linux machines.",[10,188,183],{},[10,190,191],{},"XX:+UseZGC\nOn the security side, TLS 1.3 support was added, cryptographical algorithms that lost their security were removed, and newer safer algorithms were added. Every message except the first one in the handshake is encrypted. Details at the link below.",[10,193,194,198,199],{},[77,195,196],{"href":196,"rel":197},"https:\u002F\u002Fopenjdk.java.net\u002Fjeps\u002F332",[81],"\nFinally, ",[77,200,203],{"href":201,"rel":202},"https:\u002F\u002Fwww.oracle.com\u002Ftechnetwork\u002Fjava\u002Fjavase\u002F11-relnote-issues-5012449.html",[81],"the Java 11 change list announced by Oracle is at this link.",{"title":112,"searchDepth":205,"depth":205,"links":206},2,[207,208,209,210],{"id":35,"depth":205,"text":36},{"id":51,"depth":205,"text":52},{"id":104,"depth":205,"text":105},{"id":176,"depth":205,"text":177},"2019-02-13","What's new in Java 11 and later: the new release cadence and the standout features.","md",{},true,"\u002Fen\u002Fblog\u002Fjava-11-12-13-and-beyond",{"title":5,"description":212},"en\u002Fblog\u002Fjava-11-12-13-and-beyond",[220],"java","\u002Fblog\u002Fjava-11-12-13-and-beyond","A6qbDSRQCicAZT_7f8Bh4LszB3qH-MdpiazRa5fBw5g",[224,231,238],{"path":225,"title":226,"description":227,"date":228,"tags":229},"\u002Fen\u002Fblog\u002Fjava-21-features","What's New in Java 21: Virtual Threads, Records and Pattern Matching","The Java 21 LTS features that change day-to-day code the most — virtual threads, records, switch pattern matching, record patterns, sealed classes and sequenced collections.","2026-11-01",[220,230],"guide",{"path":232,"title":233,"description":234,"date":235,"tags":236},"\u002Fen\u002Fblog\u002Finstall-java-on-centos-7-rhel-7","Installing Java on CentOS 7 & Red Hat Enterprise Linux 7","Installing Java 11 (OpenJDK) on CentOS 7 and RHEL 7 with yum, plus picking an alternative version — a short step-by-step guide.","2019-11-08",[220,237],"linux",{"path":239,"title":240,"description":241,"date":242,"tags":243},"\u002Fen\u002Fblog\u002Fspring-security-primefaces-redirect-issue-fix","Fixing the Spring Security + PrimeFaces Redirect Issue","The fix for the redirect problem that appears when using Spring Security with PrimeFaces.","2015-05-15",[220,244,245,246],"jsf","primefaces","spring",1793491380604]