<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Posts on CPH.dev</title>
        <link>https://cph.dev/posts/</link>
        <description>Recent content in Posts on CPH.dev</description>
        <generator>Hugo -- gohugo.io</generator>
        <copyright>&lt;a href=&#34;https://creativecommons.org/licenses/by-nc/4.0/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;CC BY-NC 4.0&lt;/a&gt;</copyright>
        <lastBuildDate>Mon, 13 Apr 2020 13:02:41 +0200</lastBuildDate>
        <atom:link href="https://cph.dev/posts/index.xml" rel="self" type="application/rss+xml" />
        
        <item>
            <title>Eclipse vs. Java 14 (on MacOS)</title>
            <link>https://cph.dev/posts/2020/04/eclipse-vs.-java-14-on-macos/</link>
            <pubDate>Mon, 13 Apr 2020 13:02:41 +0200</pubDate>
            
            <guid>https://cph.dev/posts/2020/04/eclipse-vs.-java-14-on-macos/</guid>
            <description>&lt;p&gt;This post serves as a reminder of how I got the new &lt;strong&gt;Eclipse 2020-03&lt;/strong&gt; build running
with &lt;strong&gt;AdoptOpenJDK 14&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I did this because I wanted to dive into Java 14 and especially the new preview feature
for &lt;a href=&#34;https://openjdk.java.net/jeps/359&#34;&gt;records&lt;/a&gt;. Of course I could do that while
still running Eclipse on a stable
and fully supported Java version like Java 11 (or even Java 8) but then again &amp;ndash;
why not go all the way?&lt;/p&gt;</description>
            <content type="html"><![CDATA[<p>This post serves as a reminder of how I got the new <strong>Eclipse 2020-03</strong> build running
with <strong>AdoptOpenJDK 14</strong>.</p>
<p>I did this because I wanted to dive into Java 14 and especially the new preview feature
for <a href="https://openjdk.java.net/jeps/359">records</a>. Of course I could do that while
still running Eclipse on a stable
and fully supported Java version like Java 11 (or even Java 8) but then again &ndash;
why not go all the way?</p>
<h2 id="eclipse-and-java-14">Eclipse and Java 14</h2>
<p>To run Eclipse with Java 14 you need three things.</p>
<p>First you&rsquo;ll need to download and install the latest version of Eclipse.
As of this writing the latest version of Eclipse is 2020-03. Get it here: <a href="https://www.eclipse.org/">https://www.eclipse.org/</a>.</p>
<p>Next is Java 14. I have chosen to run the AdoptOpenJDK variant. You can either download
and install it manually from <a href="https://adoptopenjdk.net/">https://adoptopenjdk.net/</a> or install it via your favourite
package manager.
I&rsquo;m on MacOS and installed it with <a href="https://www.macports.org/">Macports</a> using this command:</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">sudo port install openjdk14
</code></pre></div><p>For <strong>Mac users</strong> you <em>might</em> need to do one final thing. I write <em>might</em> because the
issue might have been fixed when you read this.
Try to start Eclipse (or the Eclipse Installer) &ndash; if it starts as expected then you are good to go.</p>
<p>Otherwise you might need to apply the following little hack:</p>
<ol>
<li>Open Terminal.app</li>
<li><code>cd /Library/Java/JavaVirtualMachines/openjdk14/Contents/MacOS</code></li>
<li><code>sudo ln -sf ../Home/lib/libjli.dylib libjli.dylib</code></li>
</ol>
<p>Thanks to Ari Hannula for this <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=559482#c11">tip</a>
and Jean-Pierre Matsumoto for <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=559482#c31">pointing out</a>
that <code>libjli.dylib</code> is not always in the same location.</p>
<p>Now try to start Eclipse. It should start up correctly and if you go to
About Eclipse -&gt; Installation Details -&gt; Configuration you should see that is is
indeed running on Java 14 (<code>java.version=14</code>)</p>
<p>Next step: Write some code using the Java 14 Preview Features!</p>]]></content>
        </item>
        
        <item>
            <title>Hello World in Go</title>
            <link>https://cph.dev/posts/2019/03/hello-world-in-go/</link>
            <pubDate>Sat, 30 Mar 2019 19:40:42 +0100</pubDate>
            
            <guid>https://cph.dev/posts/2019/03/hello-world-in-go/</guid>
            <description>&lt;p&gt;Want to get started with Go? Then why not jump into it and make the classic &lt;em&gt;Hello World&lt;/em&gt; program!&lt;/p&gt;</description>
            <content type="html"><![CDATA[<p>Want to get started with Go? Then why not jump into it and make the classic <em>Hello World</em> program!</p>
<p>Create a file called <code>hello.go</code> and put the following code into it:</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-go" data-lang="go"><span style="color:#f92672">package</span> <span style="color:#a6e22e">main</span>

<span style="color:#f92672">import</span> <span style="color:#e6db74">&#34;fmt&#34;</span>

<span style="color:#66d9ef">func</span> <span style="color:#a6e22e">main</span>() {
	<span style="color:#a6e22e">fmt</span>.<span style="color:#a6e22e">Println</span>(<span style="color:#e6db74">&#34;Hello, World!&#34;</span>)
}
</code></pre></div><p>To build the program run <code>go build</code> and run it with <code>./hello</code> (or if on Windows <code>hello.exe</code>)</p>
<p>That&rsquo;s it :)</p>]]></content>
        </item>
        
        <item>
            <title>Hello</title>
            <link>https://cph.dev/posts/2019/03/hello/</link>
            <pubDate>Thu, 28 Mar 2019 22:00:00 +0100</pubDate>
            
            <guid>https://cph.dev/posts/2019/03/hello/</guid>
            <description>This is the first post on this site. Mostly just to see that it works.
:)</description>
            <content type="html"><![CDATA[<p>This is the first post on this site. Mostly just to see that it works.</p>
<p>:)</p>
]]></content>
        </item>
        
    </channel>
</rss>
