<?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 on Salman's Blog</title><link>https://salmanfs.ca/tags/java/</link><description>Recent content in Java on Salman's Blog</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 02 Jan 2020 07:47:28 +0000</lastBuildDate><atom:link href="https://salmanfs.ca/tags/java/index.xml" rel="self" type="application/rss+xml"/><item><title>RPM Packaging for JMC</title><link>https://salmanfs.ca/posts/rpm-packaging-for-jmc/</link><pubDate>Thu, 02 Jan 2020 07:47:28 +0000</pubDate><guid>https://salmanfs.ca/posts/rpm-packaging-for-jmc/</guid><description>&lt;p&gt;When JDK Mission Control (JMC) was open-sourced, one of the main tasks for our team at Red Hat was to make it widely available to our developer community.
This meant packaging the application for Fedora.&lt;/p&gt;
&lt;p&gt;Fedora is a distribution of Linux sponsored by Red Hat.
It is the bleeding edge of free software and the upstream source of Red Hat&amp;rsquo;s flagship Enterprise Linux distribution, RHEL.&lt;/p&gt;
&lt;p&gt;I was tasked with packaging an RPM for JMC.
This allowed me to take a deep dive into Maven, Eclipse RCP and RPM build tools.&lt;/p&gt;</description></item><item><title>JDK Mission Control</title><link>https://salmanfs.ca/posts/jdk-mission-control/</link><pubDate>Thu, 02 Jan 2020 07:42:10 +0000</pubDate><guid>https://salmanfs.ca/posts/jdk-mission-control/</guid><description>&lt;p&gt;This was the project my team was working on during my coop at Red Hat in Toronto.
Formerly Java Mission Control, the tool was a proprietary offering in Oracle&amp;rsquo;s Java subscription.
It was open-sourced by Oracle in early 2018 (just before the start of my internship) as JDK Mission Control (JMC).
It is now a project under the OpenJDK umbrella.&lt;/p&gt;
&lt;p&gt;There was previously a similar open-source tool developed by the OpenJDK team at Red Hat called Thermostat.
Red Hat decided to focus their efforts on improving JMC rather than working on Thermostat since JMC was already the de facto industry standard.&lt;/p&gt;</description></item><item><title>Maven HelloWorld - Create, Compile and Execute a Java Maven Project</title><link>https://salmanfs.ca/posts/maven-helloworld-create-compile-and-execute-a-java-maven-project/</link><pubDate>Sat, 01 Sep 2018 02:49:43 +0000</pubDate><guid>https://salmanfs.ca/posts/maven-helloworld-create-compile-and-execute-a-java-maven-project/</guid><description>&lt;h3 id="create"&gt;Create&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mvn archetype:generate
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will start an interactive process for generating the new project. There will be prompts for the groupId, artifactId, and version (among other things).&lt;/p&gt;
&lt;p&gt;To skip the interactive method, use the following syntax instead:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mvn archetype:generate -DgroupId&lt;span style="color:#f92672"&gt;=&lt;/span&gt;ca.salmanfs.javaPractice -DartifactId&lt;span style="color:#f92672"&gt;=&lt;/span&gt;HelloWorld -DinteractiveMode&lt;span style="color:#f92672"&gt;=&lt;/span&gt;false
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="compile"&gt;Compile&lt;/h3&gt;
&lt;p&gt;Maven built us a basic Java file that prints &amp;ldquo;Hello World!&amp;rdquo;
We can compile that now:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mvn compile
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will execute the Maven build lifecycle phases of &amp;lsquo;validate&amp;rsquo; and &amp;lsquo;compile&amp;rsquo;.
This is what Maven is doing for us:&lt;/p&gt;</description></item></channel></rss>