Unleashing Java: Running Console Apps in IntelliJ

When it comes to running Java console applications in IntelliJ, many developers find themselves navigating through a complex setup process. However, with the ri...

Liam Jul 25, 2026
Must-Have IntelliJ IDEA Plugins For Java Developers
Must-Have IntelliJ IDEA Plugins For Java Developers

When it comes to running Java console applications in IntelliJ, many developers find themselves navigating through a complex setup process. However, with the right steps, you can easily set up and run your Java console application in IntelliJ. In this article, we will walk you through the process of setting up a Java console application in IntelliJ, including how to create a new project, write and run your application, and debug any issues that may arise.

Must-Have IntelliJ IDEA Plugins For Java Developers
Must-Have IntelliJ IDEA Plugins For Java Developers

Setting Up a New Project in IntelliJ

a poster with the words inteluli idea and some type of information on it's side
a poster with the words inteluli idea and some type of information on it's side

Before you can start writing and running your Java console application, you need to set up a new project in IntelliJ. To do this, follow these steps:

Creating a New Project

How to Execute and Run Java Code from the Terminal
How to Execute and Run Java Code from the Terminal

First, open IntelliJ and click on the "Create New Project" button. This will open the project creation dialog box. In this dialog box, select "Java" as the project type and choose the version of Java you want to use.

Next, choose the project SDK, which is the version of Java that your project will use. You can select the Java SDK from the list of available SDKs. Make sure to select the correct SDK version to avoid any compatibility issues.

Best Java IDEs in 2020
Best Java IDEs in 2020

Writing and Running Your Java Console Application

Once you have set up your new project, you can start writing and running your Java console application. To do this, follow these steps:

Creating a New Java Class

Java Beginner Cheetsheet
Java Beginner Cheetsheet

To write your Java console application, you need to create a new Java class. In IntelliJ, right-click on the project directory and select "New" > "Java Class". This will open the Java class creation dialog box. In this dialog box, enter the name of your class and click on the "OK" button.

Once you have created your new Java class, you can start writing your application code. In this class, you can use the `System.out.println()` method to print output to the console. For example:

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}

With your application code written, you can now run your Java console application. To do this, click on the "Run" button in the top-right corner of the IntelliJ window. This will compile and run your application, and you will see the output printed to the console.

Java OOP concepts cheat sheet
Java OOP concepts cheat sheet

Debugging Your Java Console Application

While running your Java console application, you may encounter issues that prevent your application from working as expected. To debug your application, follow these steps:

Interface in Java
Interface in Java
☕ Java Basics Cheat Sheet for Beginners | Learn Java in One Page 🚀
☕ Java Basics Cheat Sheet for Beginners | Learn Java in One Page 🚀
the roadmap to learn java from zero - to - job ready info sheet
the roadmap to learn java from zero - to - job ready info sheet
Top 5 Java Projects for Beginners
Top 5 Java Projects for Beginners
a woman wearing headphones and pointing at a computer screen with the words how to learn in japanese
a woman wearing headphones and pointing at a computer screen with the words how to learn in japanese
🧠 HOW TO CREATE AND USE JAVA INTERFACES EFFECTIVELY 💡
🧠 HOW TO CREATE AND USE JAVA INTERFACES EFFECTIVELY 💡
Learn Java in 30 Days Only
Learn Java in 30 Days Only
Top 10 Applications of Java in Real World
Top 10 Applications of Java in Real World
a poster with different types of writing and numbers on it, including the words'jwa beginner notes '
a poster with different types of writing and numbers on it, including the words'jwa beginner notes '

Using the Debugger

IntelliJ has a built-in debugger that allows you to step through your code and identify where the issue lies. To use the debugger, click on the "Debug" button in the top-right corner of the IntelliJ window. This will open the debugger window, where you can set breakpoints and step through your code.

When you encounter an issue while running your application, you can use the debugger to identify the problem. For example, if your application throws an exception, the debugger will pause at the line where the exception was thrown. From there, you can inspect the variables and method calls to understand what went wrong.

With these steps, you can set up and run your Java console application in IntelliJ. Remember to always test your application thoroughly to ensure that it works as expected. By following these steps, you can create and run your own Java console applications in IntelliJ.

Visual guide

Must-Have IntelliJ IDEA Plugins For Java Developers
Must-Have IntelliJ IDEA Plugins For Java Developers
a poster with the words inteluli idea and some type of information on it's side
a poster with the words inteluli idea and some type of information on it's side
How to Execute and Run Java Code from the Terminal
How to Execute and Run Java Code from the Terminal
Best Java IDEs in 2020
Best Java IDEs in 2020
Java Beginner Cheetsheet
Java Beginner Cheetsheet
Java OOP concepts cheat sheet
Java OOP concepts cheat sheet
Interface in Java
Interface in Java
☕ Java Basics Cheat Sheet for Beginners | Learn Java in One Page 🚀
☕ Java Basics Cheat Sheet for Beginners | Learn Java in One Page 🚀

Related topics