DEV Community

Mtende Otis II
Mtende Otis II

Posted on

Setting Up for Java on Linux.

Firstly, congratulations for using a great open source software,Linux.
To get started I will have to explain the two main components you need to have Java up and running on your machine. You will need the Java development kit (JDK) and an IDE. Yes, Just those two (does a backflip celebration).

The JDK includes tools useful for developing and testing programs written in the Java programming language. So to install it.

  1. Open your terminal
  2. Run the following command

sudo apt install default-jdk

  1. Fill in your password and voila. You should have the JDK installed

If you are super curious about JDK you can read about it here and watch this Video

Now that we have installed the JDK you may want to know version you are using run the command java --version
This should tell you the version of java on your machine.

Secondly getting an IDE. Well if you have been in the programming scene for a long time you may have come across multiple IDEs, vsCode and code blocks just to list a few. In my works with Vs code it really demanded for me to download alot of extensions just to run Java which i find cumbersome for beginners but If you are a person that likes a challenge then well here is the link to setting it up. Good luck!!!

My personal favourite IDE for java is Intellej Idea. Apart from not demanding the extra extension, It was designed special for Java and Java related languages so it runs java smoothly with great compilation time. so lets install it. Make sure you have snap before installing it

  1. Open your terminal again and then run sudo snap install intellij-idea-ultimate --classic

Note: _You will get the classic ultimate version with this one but if you want the free one you have to get the community editon by running _

sudo snap install intellij-idea-community --classic --edge

After installing it give it a try and create a project.

Top comments (0)