<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: DevObsessed</title>
    <description>The latest articles on DEV Community by DevObsessed (@devobsessed).</description>
    <link>https://dev.to/devobsessed</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F6135%2F693bd219-b84f-4cd3-849b-28bf29c23a37.png</url>
      <title>DEV Community: DevObsessed</title>
      <link>https://dev.to/devobsessed</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/devobsessed"/>
    <language>en</language>
    <item>
      <title>Language Version Managers - the Developer Parachutes</title>
      <dc:creator>Jeff Sheets</dc:creator>
      <pubDate>Thu, 29 Sep 2022 14:47:12 +0000</pubDate>
      <link>https://dev.to/devobsessed/language-version-managers-the-developer-parachutes-bmn</link>
      <guid>https://dev.to/devobsessed/language-version-managers-the-developer-parachutes-bmn</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Installing multiple language versions (e.g. Java 11, Java 19, Java 8 | Node 8, Node 16 | Python 2, Python 3 | etc) on your machine is scary, and not for the faint of heart.&lt;/p&gt;

&lt;p&gt;Conquer your fears with the benefit of a developer parachute, by using a Language Version Manager!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As software engineering consultants at &lt;a href="https://www.devobsessed.com/"&gt;DevObsessed&lt;/a&gt;, we get asked to help with an assortment of various projects – from legacy codebases running in maybe Java 8 or NodeJS 6, to greenfield creations using the newest versions of Java 19 or NodeJS 16. This isn't only an issue between companies though, as most organizations have multiple versions of languages running at any given time too. &lt;/p&gt;

&lt;p&gt;Managing local installations of Java, Node, Python, Ruby, Elixir, etc can be daunting. In the past, trying out the latest version to check for bugs could lead to a developer's machine being down for hours at a time. And if a rollback to a previous version was needed that could take even longer! Wouldn't it be great if you could have a parachute with you on your mission, so that if anything goes wrong you can easily save yourself and proceed with confidence?&lt;/p&gt;

&lt;p&gt;Language Version Managers are your answer. Many version managers exist, and in this post we'll show you how Sdkman for Java, and NVM for Node can provide you the courage to easily utilize multiple language versions without any worry in the process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Backstory
&lt;/h3&gt;

&lt;p&gt;To set the scene, you should know that originally this post was going to be about the recent release of &lt;a href="https://twitter.com/java/status/1572243891562381313"&gt;Java 19&lt;/a&gt;. It would be a story about the newest and latest Java features, maybe how to use them, and probably why they would make it great for you to upgrade.&lt;/p&gt;

&lt;p&gt;Without thinking about it, using &lt;a href="https://sdkman.io/"&gt;Sdkman&lt;/a&gt; with a quick &lt;code&gt;sdk install java 19-open&lt;/code&gt; and my MacbookPro was running the newest Java within seconds. It was so easy to upgrade to the cutting edge version, that it was summed up easily in a single tweet:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y6Xn_CSh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lla9ze5jiuapmi0hqnl2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y6Xn_CSh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lla9ze5jiuapmi0hqnl2.png" alt="Tweet of Sdkman installing Java" width="880" height="784"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://twitter.com/sheetsj/status/1572298842460286980"&gt;https://twitter.com/sheetsj/status/1572298842460286980&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not until this moment did &lt;a href="https://twitter.com/sheetsj/status/1572324247351197696"&gt;I dive in&lt;/a&gt; to see that Java 19 was more of an incremental release. Some bugfixes for sure, but mostly it includes just some &lt;a href="https://openjdk.org/projects/jdk/19/"&gt;Preview and Incubator features&lt;/a&gt; (hiding behind feature flags) that won't be fully live until Java 20 or beyond.&lt;/p&gt;

&lt;p&gt;So after a few moments of trying out &lt;a href="https://twitter.com/sheetsj/status/1572316099030687744"&gt;Gradle&lt;/a&gt; and &lt;a href="https://twitter.com/sheetsj/status/1572319232096088064"&gt;IntelliJ&lt;/a&gt; support, I quickly reverted back to my previous Java version with &lt;code&gt;sdk default java 18.0.2.1-open&lt;/code&gt;. No fuss and no worry. Then it dawned on me how before Sdkman this would have taken me probably many minutes if not hours of work to flip back and forth between Java installation versions locally.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sdkman for Java
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DM9HHG5r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qgyvgnljdlswo66in6n7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DM9HHG5r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qgyvgnljdlswo66in6n7.png" alt="Sdkman logo" width="294" height="171"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://sdkman.io/"&gt;sdkman.io&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://sdkman.io/"&gt;Sdkman&lt;/a&gt; is the best Language Version manager for Java and all JVM languages, to include Groovy, Kotlin, and more. Don't use &lt;code&gt;brew&lt;/code&gt; or Oracle or some other installer on your macbook. Instead, install Sdkman and use a few commands to manage the version that you use.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use the install instructions for Sdkman from &lt;a href="https://sdkman.io/"&gt;https://sdkman.io/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sdk ls java&lt;/code&gt; to see the various versions of Java that are available&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sdk install java 18.0.2.1-open&lt;/code&gt; to install the Java18 OpenJdk version (or &lt;a href="https://sdkman.io/jdks"&gt;pick your favorite distribution&lt;/a&gt; from Azul or Microsoft or Amazon, etc)&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;use&lt;/code&gt; keyword can switch the version for a single shell window, like &lt;code&gt;sdk use java 19-open&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;default&lt;/code&gt; keyword will setup a default for your whole machine, like &lt;code&gt;sdk default java 18.0.2.1-open&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Similarly use the same commands for Groovy &lt;code&gt;sdk ls groovy&lt;/code&gt;, or Kotlin, or &lt;a href="https://sdkman.io/sdks"&gt;any of the 20+ various JVM languages&lt;/a&gt;!&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  NVM for NodeJS
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--54zuJ3oH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8x5e0vkafq516b3qim08.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--54zuJ3oH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8x5e0vkafq516b3qim08.png" alt="Nvm logo" width="283" height="100"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/nvm-sh/nvm"&gt;https://github.com/nvm-sh/nvm&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the Node world, there are a few options like &lt;a href="https://github.com/nvm-sh/nvm"&gt;NVM&lt;/a&gt;, &lt;a href="https://github.com/tj/n"&gt;N&lt;/a&gt;, &lt;a href="https://github.com/Schniz/fnm"&gt;FNM&lt;/a&gt;, &lt;a href="https://volta.sh/"&gt;Volta&lt;/a&gt;, and more. I've been a longtime user of NVM, so we'll detail those instructions for use here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;While unofficially supported, nvm can be installed with &lt;a href="https://brew.sh/"&gt;homebrew&lt;/a&gt; using &lt;code&gt;brew install nvm&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;Follow any additional instructions to setup your shell in .zsh or .bash_profile or whatever shell you use &lt;/li&gt;
&lt;li&gt;Or find other installation instructions at &lt;a href="https://github.com/nvm-sh/nvm#install--update-script"&gt;https://github.com/nvm-sh/nvm#install--update-script&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;nvm ls&lt;/code&gt; to see the available Node versions&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;nvm install --lts&lt;/code&gt; to get the latest stable LTS (Long Term Support) version&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;nvm install v8.17.0&lt;/code&gt; or similar to get a specific version&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;nvm use v8.17.0&lt;/code&gt; or similar to use a specific version in a single shell window&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;nvm alias default v16.17.0&lt;/code&gt; or similar to set a default version&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Wrap-up
&lt;/h3&gt;

&lt;p&gt;There are other various version managers for other languages. Ruby has &lt;a href="https://github.com/rbenv/rbenv"&gt;rbenv&lt;/a&gt; or &lt;a href="https://rvm.io/"&gt;RVM&lt;/a&gt;, Python has &lt;a href="https://github.com/pyenv/pyenv"&gt;pyenv&lt;/a&gt;, Elixir has &lt;a href="https://github.com/taylor/kiex"&gt;kiex&lt;/a&gt;, and many more. No matter what language you are on, the key is to find a language installation manager to handle the various versions that you may need to use.&lt;/p&gt;

&lt;p&gt;In the Java and Node worlds, Sdkman and Nvm are the parachutes you need for confidence, courage, and to save you from configuration management worry!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PYHs8Hc5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7ebuqyq3pdj69fiaar0y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PYHs8Hc5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7ebuqyq3pdj69fiaar0y.png" alt="[DevObsesse.com](https://www.devobsessed.com/)" width="880" height="230"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And if you're looking for the best software engineer consultants for your project or team, developers who average over 10 years of experience, and come with even more tips and tricks that we've learned to improve developer experience over those years -- reach out to us here at DevObsessed! We're obsessed about developer efficiency, and we'll help you achieve your own digital destination!&lt;/p&gt;

</description>
      <category>node</category>
      <category>java</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
