Picture of RealToughCandy: https://www.pexels.com/es-es/foto/persona-mano-colorido-naturaleza-muerta-11035360/

Java Hello World + IDE

Braulio Lopez
3 min readMar 22, 2023

--

Small guide to setup your IDE to develop Java programs and clone Git repos.

Install Java + IDE

This is based on the official guide https://www.jetbrains.com/help/idea/creating-and-running-your-first-java-application.html#get-started

  1. Download and Install Intellij IDEA Community Edition.

https://www.jetbrains.com/es-es/idea/download

2. Open Intellij and create a new project.

3. If this is your first time with Java, you will see the <No SDK> message in the JDK field.

New project with no JDK configured
New project with no JDK configured.

4. Click the JDK dropdown and select download JDK.

5. Choose a stable version as 17. Optionally you can change this version later (see step 12).

Select version 17 of the JDK to install
Select version 17 of the JDK to install.

6. Click download and wait.

7. You will see the JDK 17 selected. Click create.

New project with JDK 17 configured
New project with JDK 17 configured.

8. The project will open with a Hello World example by default.

9. Wait for the indexing to complete.

Indexing JDK
Indexing JDK.

10. Open src/Main file.

Hello world example.
Hello world example.

11. Click the play button at the left side of the main method. Then select Run ‘Main.main()’.

Run main method
Run main method.

12. At the bottom you will see the Hello world! message printed in the console. Once you have the project opened you can change the JDK version from the menu File > Project Structure > language level.

Hello world output
Hello world output.

Clone Git repos

We will use the Intellij IDE to install Git and clone git repos.

  1. Go to File > New > Project from Version Control.
New project from version control.
New project from version control.

2. If you don’t have Git installed click Download and Install. For windows users it will install an extra app, you must accept it.

Git not installed.
Git not installed.

3. After Git is installed, paste the Git URL and click Clone.

Ready to clone Git repo
Ready to clone Git repo.

4. It will ask you to trust the project and to open it on a separate window.

5. Finally you will see the project opened.

Git repo cloned.
Git repo cloned.

Conclusion

Setting up an environment to clone and run Java code is super easy using Intellij.

--

--

Braulio Lopez

A simple man that likes coding, camping and playing piano.