<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Java 18 on TheJavaGuy Blog 🚀</title>
    <link>/tags/java-18/</link>
    <description>Recent content in Java 18 on TheJavaGuy Blog 🚀</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright © 2016-2026 Ivan Milosavljević. All Rights Reserved.
</copyright>
    <lastBuildDate>Thu, 19 May 2022 00:00:00 +0000</lastBuildDate><atom:link href="/tags/java-18/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How to install Java 18 (OpenJDK 18) on Windows</title>
      <link>/posts/010-how-to-install-jdk-18-on-windows/</link>
      <pubDate>Thu, 19 May 2022 00:00:00 +0000</pubDate>
      <guid>/posts/010-how-to-install-jdk-18-on-windows/</guid>
      <description><![CDATA[<p>Java 18 is currently the latest version of Java. Even though it isn&rsquo;t a LTS release, it&rsquo;s worth installing it so we can test new features. <a href="/posts/001-how-to-install-jdk-18-on-macos/">In one of the previous articles</a> I have written about how to install it on MacOS. In this article I will show you how to install JDK 18 on Windows, add it to the path and to setup IntelliJ IDEA so you can write Java applications against it.</p>]]></description><enclosure url="/posts/010-how-to-install-jdk-18-on-windows/cover.png" length="103199" type="image/png" />
    </item>
    
    <item>
      <title>New in Java 18: Deprecation of Finalization Mechanism</title>
      <link>/posts/009-new-in-java-18-deprecation-of-finalization-mechanism/</link>
      <pubDate>Thu, 12 May 2022 00:00:00 +0000</pubDate>
      <guid>/posts/009-new-in-java-18-deprecation-of-finalization-mechanism/</guid>
      <description><![CDATA[<p>When I had heard that finalization is (finally!) marked for removal, I was really happy. Some time in the future it will be gone for good from the JDK, which means less code, higher reliability, tighter security and a tad more performance. Marking something for removal from JDK is an extremely rare event. After all, source compatibility is one of the strongest Java&rsquo;s points - you can just grab some source code from version X and it&rsquo;s a really big surprise if it doesn&rsquo;t compile in verson X+N. What is so bad about the finalization that it had to be marked for removal?</p>]]></description><enclosure url="/posts/009-new-in-java-18-deprecation-of-finalization-mechanism/cover.png" length="73754" type="image/png" />
    </item>
    
    <item>
      <title>New in Java 18: Code snippets in Javadoc (part 2)</title>
      <link>/posts/007-new-in-java-18-code-snippets-in-javadoc-part-2/</link>
      <pubDate>Thu, 28 Apr 2022 00:00:00 +0000</pubDate>
      <guid>/posts/007-new-in-java-18-code-snippets-in-javadoc-part-2/</guid>
      <description><![CDATA[<p>In the <a href="/posts/003-new-in-java-18-code-snippets-in-javadoc-part-1/">part 1</a> we&rsquo;ve seen how we can use inline snippets in Javadoc and how to control their appearance with regions and highlighting. While such usage should be enough for a lot of use-cases, from time to time we&rsquo;ll need more power, for example to include snippets with block comments. In such cases, external snippets come to the rescue. Let&rsquo;s see how to use them!</p>]]></description><enclosure url="/posts/007-new-in-java-18-code-snippets-in-javadoc-part-2/cover.png" length="81741" type="image/png" />
    </item>
    
    <item>
      <title>New in Java 18: UTF-8 by default</title>
      <link>/posts/006-new-in-java-18-utf8-by-default/</link>
      <pubDate>Thu, 14 Apr 2022 00:00:00 +0000</pubDate>
      <guid>/posts/006-new-in-java-18-utf8-by-default/</guid>
      <description><![CDATA[<p>Ah, good old charsets, who doesn&rsquo;t like them! With so many variations in operating systems, programming languages, human languages, geographical locations etc. what could possibly go wrong when we try to read from or write to files, sockets, screens and other input-output devices? It turns out, quite a lot. There&rsquo;s no shortage of developer horror stories caused by wrong or improper encoding of data. While Java 18 doesn&rsquo;t promise a silver bullet, it makes a step in the right direction because ubiquitous UTF-8 charset will become a default. Let&rsquo;s see what it means to us developers.</p>]]></description><enclosure url="/posts/006-new-in-java-18-utf8-by-default/cover.png" length="77632" type="image/png" />
    </item>
    
    <item>
      <title>New in Java 18: Simple Web Server (part 2)</title>
      <link>/posts/005-new-in-java-18-sws-part-2/</link>
      <pubDate>Thu, 07 Apr 2022 00:00:00 +0000</pubDate>
      <guid>/posts/005-new-in-java-18-sws-part-2/</guid>
      <description><![CDATA[<p>In the <a href="/posts/004-new-in-java-18-sws-part-1/">part 1</a> we&rsquo;ve seen how we can use Simple Web Server (SWS) from the command line during writing or debugging web applications. While such usage should be enough for a lot of use-cases, from time to time we&rsquo;ll need more control over which HTTP methods, headers, MIME types etc. That&rsquo;s why in Java 18 there is a possibility to use SWS programmatically, i.e. to embed it into our applications. For that, we can use some existing classes (i.e. pre Java 18) and also some new ones. Let&rsquo;s see the basic programmatic usage of Simple Web Server (SWS) in action!</p>]]></description><enclosure url="/posts/005-new-in-java-18-sws-part-2/cover.png" length="94649" type="image/png" />
    </item>
    
    <item>
      <title>New in Java 18: Simple Web Server (part 1)</title>
      <link>/posts/004-new-in-java-18-sws-part-1/</link>
      <pubDate>Thu, 31 Mar 2022 00:00:00 +0000</pubDate>
      <guid>/posts/004-new-in-java-18-sws-part-1/</guid>
      <description><![CDATA[<p>A lot of developers work on writing or debugging web applications daily. Sometimes that work involves writing our application&rsquo;s backend and sometimes consuming other web resources, whether they are APIs or &ldquo;normal&rdquo; web pages. Other programming languages recognised the need for having a &ldquo;quick and dirty&rdquo; way of serving resources over HTTP(S) protocol during the development. Good people that developed JDK 18 gave us the opportunity to have that in Java too so we don&rsquo;t have to look at node.js, Python or PHP developers with envy any more when they brag how simple it is to start serving resources in their languages. Let&rsquo;s see the basic usage of Simple Web Server (SWS) in action!</p>]]></description><enclosure url="/posts/004-new-in-java-18-sws-part-1/cover.png" length="94222" type="image/png" />
    </item>
    
    <item>
      <title>New in Java 18: Code snippets in Javadoc (part 1)</title>
      <link>/posts/003-new-in-java-18-code-snippets-in-javadoc-part-1/</link>
      <pubDate>Thu, 24 Mar 2022 00:00:00 +0000</pubDate>
      <guid>/posts/003-new-in-java-18-code-snippets-in-javadoc-part-1/</guid>
      <description><![CDATA[<p>As Java developers our job is not only to write working code but also to document it properly. Since its beginnings Java provided us with the <code>javadoc</code> tool which generates this documentation from the specially formatted <em>documentation comments</em> we wrote in the source code. In these documentation comments we use various <em>tags</em> to document parameters, return values, exceptions thrown etc. It is often the case that we must include a code snippet to show intended usage of our code. Until Java 18 we relied on the <code>@code</code> tag, perhaps in combination with <code>&lt;pre&gt;…&lt;/pre&gt;</code> if we needed multi-line snippets. But now we have a better way and that is by using new <code>@snippet</code> tag. Let&rsquo;s see its basic usage in action!</p>]]></description><enclosure url="/posts/003-new-in-java-18-code-snippets-in-javadoc-part-1/cover.png" length="97989" type="image/png" />
    </item>
    
    <item>
      <title>How to install Java 18 (OpenJDK 18) on MacOS</title>
      <link>/posts/001-how-to-install-jdk-18-on-macos/</link>
      <pubDate>Thu, 10 Mar 2022 00:00:00 +0000</pubDate>
      <guid>/posts/001-how-to-install-jdk-18-on-macos/</guid>
      <description><![CDATA[<p>Java 18 is currently the latest version of Java. Even though it isn&rsquo;t a LTS release, it&rsquo;s worth installing it so we can test new features. In this article I will show you how to install JDK 18 on MacOS and to setup IntelliJ IDEA so you can write Java applications against it.</p>]]></description><enclosure url="/posts/001-how-to-install-jdk-18-on-macos/cover.png" length="116529" type="image/png" />
    </item>
    
  </channel>
</rss>

