Even if the runtimes installation with
apt-get seems to be a trivial task, there is limited control over installed version of the runtime.
The goal is to configure environment where you can easily change Java, Ruby , node.js and python versions.
Where you can define the runtime version on project level.
The most convenient way to configure and manage runtimes is to use environment managers.
Environment manager is nothing more than shell script, the script intercepts executed commands using shim executables injected into your
There are two flavours of the environment managers:
I prefer the second one, it is less obtrusive and follows general unix principle: “do one thing and do it well”.
Let’s start and install environment managers (for Java, Ruby, node.js and Python) into your home directory:
1 2 3 4
nodenv you can install plugins that provide
rbenv install and
nodenv install commands to compile and install runtimes automatically.
For Java you have to download and install JVM manually.
Add environment managers to the
PATH variable and initialize them to get command auto completion.
Append the following snippet at the end of
.bash_profile on Mac) file.
1 2 3 4 5 6 7 8 9 10 11
Install runtimes using environment managers (Java needs to be installed manually):
1 2 3 4
Install build tools (maven, gradle, sbt, etc.), create symbolic links, and configure
Make build tools jenv aware:
1 2 3
Finally add shell helper functions for JVM configuration to the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
The last step is to read environment managers manual. As long as all four managers are very similar it should not take more than one evening.