{"id":74554,"date":"2020-03-18T20:41:55","date_gmt":"2020-03-18T17:41:55","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/vypusk-java-se-14"},"modified":"2020-03-18T20:41:55","modified_gmt":"2020-03-18T17:41:55","slug":"vypusk-java-se-14","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/news\/vypusk-java-se-14","title":{"rendered":"Java SE 14 Release","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>After six months of development, Oracle has announced <noindex><a rel=\"nofollow\" href=\"http:\/\/mail.openjdk.java.net\/pipermail\/announce\/2020-March\/000282.htm\">released<\/a><\/noindex> the platform <noindex><a rel=\"nofollow\" href=\"https:\/\/www.oracle.com\/java\/technologies\/javase-downloads.html\">Java SE 14<\/a><\/noindex> (Java Platform, Standard Edition 14), which uses the open-source project OpenJDK as its reference implementation. Java SE 14 maintains backward compatibility with previous versions of the Java platform, and all previously written Java projects will work without changes when run on the new version. Installable builds of Java SE 14 (JDK, JRE, and Server JRE) <noindex><a rel=\"nofollow\" href=\"http:\/\/jdk.java.net\/14\">are prepared<\/a><\/noindex> for Linux (x86_64), Windows, and macOS. The reference implementation developed under the OpenJDK project <noindex><a rel=\"nofollow\" href=\"http:\/\/openjdk.java.net\/projects\/jdk\/14\/\">Java 14<\/a><\/noindex> is fully open under the GPLv2 license with exceptions from GNU ClassPath, allowing dynamic linking with commercial products. <\/p>\n<p>Java SE 14 is classified as a release with a normal support period, updates for which will be released until the next release. For long-term support (LTS), Java SE 11 should be used, with updates released until 2026. The previous LTS branch, Java 8, will be supported until December 2020. The next LTS release is scheduled for September 2021. It should be noted that starting from Java 10, the project has switched to a new development process, implying a shorter cycle for new releases. New features are now developed in a continuously updated master branch, which includes ready changes and from which branches for stabilizing new releases are forked every six months. <\/p>\n<p>From <noindex><a rel=\"nofollow\" href=\"http:\/\/openjdk.java.net\/projects\/jdk\/14\/\">new features<\/a><\/noindex> <noindex><a rel=\"nofollow\" href=\"https:\/\/jdk.java.net\/14\/release-notes#newfeatures\">Java 14<\/a><\/noindex> <noindex><a rel=\"nofollow\" href=\"https:\/\/www.oracle.com\/java\/technologies\/javase\/14u-relnotes.html\">in<\/a><\/noindex> <noindex><a rel=\"nofollow\" href=\"https:\/\/blogs.oracle.com\/javamagazine\/java-14-arrives-with-a-host-of-new-features\">note<\/a><\/noindex>:<\/p>\n<ul>\n<li class=\"l\"> Experimental support has been added for <noindex><a rel=\"nofollow\" href=\"https:\/\/openjdk.java.net\/jeps\/305\">matching with a pattern<\/a><\/noindex> in the instanceof operator, which allows you to immediately define a local variable to refer to the checked value. For example, you can write \"if (obj instanceof String s &amp;&amp; s.length() &gt; 5) {... s.contains(..) ...}\" without explicitly defining \"String s = (String) obj\".\n<p>Previously:<\/p>\n<p>   if (obj instanceof Group) {<br \/>\n     Group group = (Group) obj;<br \/>\n     var entries = group.getEntries();<br \/>\n   }<\/p>\n<p>Now you can do without defining \"Group group = (Group) obj\":<\/p>\n<p>   if (obj instanceof Group group) {<br \/>\n     var entries = group.getEntries();<br \/>\n   }<\/p>\n<li class=\"l\"> Experimental support for the new keyword \"<noindex><a rel=\"nofollow\" href=\"https:\/\/openjdk.java.net\/jeps\/359\">record<\/a><\/noindex>\", providing a compact form for defining classes, avoiding the explicit definition of various low-level methods such as equals(), hashCode(), and toString() when data is stored only in fields, the behavior of which does not change. When a class uses default implementations of equals(), hashCode(), and toString(), you can do without explicitly defining them:\n<p>   public record BankTransaction(LocalDate date,<br \/>\n                              double amount,<br \/>\n                              String description) {}<\/p>\n<p>This declaration will lead to the automatic addition of implementations for the methods equals(), hashCode(), and toString(), along with the constructor and methods that manage data changes (getter).<\/p>\n<li class=\"l\"> <noindex><a rel=\"nofollow\" href=\"https:\/\/openjdk.java.net\/jeps\/361\">Standardized<\/a><\/noindex> and by default, support for the new form of expressions \"switch\", which does not require the use of the \"break\" statement, allowing the combination of duplicate labels and permitting its use not only as a statement but also as an expression.\n<p>   var log = switch (event) {<br \/>\n       case PLAY -&gt; \"User has triggered the play button\";<br \/>\n       case STOP, PAUSE -&gt; \"User needs a break\";<br \/>\n       default -&gt; {<br \/>\n           String message = event.toString();<br \/>\n           LocalDateTime now = LocalDateTime.now();<br \/>\n           yield \"Unknown event \" + message +<br \/>\n              \" logged on \" + now;<br \/>\n       }<br \/>\n   };<\/p>\n<li class=\"l\"> Extended experimental support for <noindex><a rel=\"nofollow\" href=\"https:\/\/openjdk.java.net\/jeps\/368\">text blocks<\/a><\/noindex> \u2014 a new form of string literals that allow inclusion of multi-line text data in the source code without character escaping while preserving the original text formatting in the block. The block is framed by three double quotes. In Java 14, text blocks support the escape sequence \"\\s\" to define a single space and \"\\\" for concatenating with the next line (ignoring the newline when a very long line is to be output). For example, instead of the code\n<p>   String html = \"\" +<br \/>\n   \"\\n\\t\" + \"\" +<br \/>\n   \"\\n\\t\\t\" + \"<h1>Java 14 is here!<\/h1>\" +<br \/>\n   \"\\n\\t\" + \"\" +<br \/>\n   \"\\n\" + \"\";<\/p>\n<p>you can specify:<\/p>\n<p>   String html = \"\"<br \/>\n   &lt;HTML&gt;<br \/>\n     <h1>\"Java 15\\<br \/>\n       <h1>\"Java 14\"<br \/>\n is here!\"<\/h1><br \/>\n     API  Legacy DatagramSocket. The old implementations of java.net.DatagramSocket and java.net.MulticastSocket have been replaced with a modern implementation that is easier to debug and maintain, as well as compatible with virtual threads being developed under the Loom project.<br \/>\n   \"\";<\/p>\n<li class=\"l\"> Increased diagnostics information when exceptions occur <noindex><a rel=\"nofollow\" href=\"https:\/\/openjdk.java.net\/jeps\/358\">NullPointerException<\/a><\/noindex>. Previously, error messages only referenced the line number, but now they detail which method triggered the exception. Extended diagnostics are currently enabled only when launched with the flag \"-XX:+ShowCodeDetailsInExceptionMessages\". For example, when using this flag, the exception on line\n<p>   var name = user.getLocation().getCity().getName();<\/p>\n<p> will produce the output message<\/p>\n<p>   Exception in thread \"main\" java.lang.NullPointerException: Cannot invoke \"Location.getCity()\"<br \/>\n   because the return value of \"User.getLocation()\" is null<br \/>\n   at NullPointerExample.main(NullPointerExample.java:5):5)<\/p>\n<p>which helps to understand that the method Location.getCity() was not invoked, but User.getLocation() returned a null value.<\/p>\n<li class=\"l\"> <noindex><a rel=\"nofollow\" href=\"https:\/\/openjdk.java.net\/jeps\/343\">Implemented<\/a><\/noindex> A preliminary version of the jpackage utility, allowing the creation of packages for self-contained Java applications. The utility is based on javapackager from JavaFX and enables package formation in formats native to various platforms (msi and exe for Windows, pkg and dmg for macOS, deb and rpm for Linux). Packages include all necessary dependencies.\n<li class=\"l\"> G1 Garbage Collector <noindex><a rel=\"nofollow\" href=\"https:\/\/openjdk.java.net\/jeps\/345\">implemented<\/a><\/noindex> a new memory management mechanism that takes into account the specifics of operation on large systems using architecture <noindex><a rel=\"nofollow\" href=\"https:\/\/ru.wikipedia.org\/wiki\/Non-Uniform_Memory_Access\">NUMA<\/a><\/noindex>. A new memory allocator can be enabled using the flag \"+XX:+UseNUMA\" and significantly increases performance on NUMA systems.\n<li class=\"l\"> <noindex><a rel=\"nofollow\" href=\"https:\/\/openjdk.java.net\/jeps\/349\">Added<\/a><\/noindex> API for on-the-fly monitoring of JFR (JDK Flight Recorder) events, for example, for continuous monitoring.\n<li class=\"l\"> <noindex><a rel=\"nofollow\" href=\"https:\/\/openjdk.java.net\/jeps\/352\">Added<\/a><\/noindex> jdk.nio.mapmode module, offering new modes (READ_ONLY_SYNC, WRITE_ONLY_SYNC) for creating mapped byte buffers (MappedByteBuffer) that reference non-volatile memory (NVM).\n<li class=\"l\"> <noindex><a rel=\"nofollow\" href=\"https:\/\/openjdk.java.net\/jeps\/370\">Implemented<\/a><\/noindex> A preliminary version of the Foreign-Memory Access API, enabling Java applications to safely and efficiently access memory areas outside the Java heap by manipulating new abstractions MemorySegment, MemoryAddress, and MemoryLayout.\n<li class=\"l\"> <noindex><a rel=\"nofollow\" href=\"https:\/\/openjdk.java.net\/jeps\/362\">Declared<\/a><\/noindex> deprecated ports for Solaris OS and SPARC processors (Solaris\/SPARC, Solaris\/x64, and Linux\/SPARC) with the intention to remove these ports in the future. Classifying these ports as deprecated will allow the community to accelerate the development of new features in OpenJDK without spending time on maintaining Solaris and SPARC-specific peculiarities.\n<li class=\"l\"> <noindex><a rel=\"nofollow\" href=\"https:\/\/openjdk.java.net\/jeps\/363\">Removed<\/a><\/noindex> the CMS (Concurrent Mark Sweep) garbage collector, which was marked as deprecated two years ago and has not been supported since (the G1 garbage collector has long replaced CMS). Additionally, <noindex><a rel=\"nofollow\" href=\"https:\/\/openjdk.java.net\/jeps\/366\">announced<\/a><\/noindex> the outdated application of the combination of garbage collection algorithms ParallelScavenge and SerialOld (launching with the options \"-XX:+UseParallelGC -XX:-UseParallelOldGC\").\n<li class=\"l\"> Experimental support for the ZGC (Z Garbage Collector) on macOS and Windows platforms has been provided (previously supported only on Linux). ZGC operates in a passive mode, minimizing pauses due to garbage collection as much as possible (the stop time when using ZGC does not exceed 10 ms) and can work with both small and huge heaps, ranging from several hundred megabytes to many terabytes.\n<li class=\"l\"> <noindex><a rel=\"nofollow\" href=\"https:\/\/openjdk.java.net\/jeps\/367\">The following packages have been removed:<\/a><\/noindex> tooling and API for compressing JAR files using the Pack200 algorithm.\n<\/ul>\n<p><noindex><a rel=\"nofollow\" name=\"link\"><\/a><\/noindex><\/p>\n<p>Source: <a \ncontent=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=52559\">opennet.ru<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041f\u043e\u0441\u043b\u0435 \u0448\u0435\u0441\u0442\u0438 \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Oracle \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 Java SE 14 (Java Platform, Standard Edition 14), \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 OpenJDK. \u0412 Java SE 14 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 \u043f\u0440\u043e\u0448\u043b\u044b\u043c\u0438 \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u043c\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Java, \u0432\u0441\u0435 \u0440\u0430\u043d\u0435\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 Java-\u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-74554","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041f\u043e\u0441\u043b\u0435 \u0448\u0435\u0441\u0442\u0438 \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Oracle \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/news\/vypusk-java-se-14\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0412\u044b\u043f\u0443\u0441\u043a Java SE 14 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041f\u043e\u0441\u043b\u0435 \u0448\u0435\u0441\u0442\u0438 \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Oracle \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/news\/vypusk-java-se-14\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-03-18T17:41:55+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-03-18T17:41:55+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Release Java SE 14 | ProHoster","description":"\ud83e\udd47Release of Java SE 13 | ProHoster","canonical_url":"https:\/\/prohoster.info\/en\/blog\/news\/vypusk-java-se-14","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0412\u044b\u043f\u0443\u0441\u043a Java SE 14 | ProHoster","og:description":"\u041f\u043e\u0441\u043b\u0435 \u0448\u0435\u0441\u0442\u0438 \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Oracle \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443","og:url":"https:\/\/prohoster.info\/en\/blog\/news\/vypusk-java-se-14","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-03-18T17:41:55+00:00","article:modified_time":"2020-03-18T17:41:55+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"74554","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 18:12:24","updated":"2022-10-01 23:29:02","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/74554","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=74554"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/74554\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=74554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=74554"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=74554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}