Skip to content

Commit e11508b

Browse files
committed
Final fixes as discussed with Ana
1 parent 2704039 commit e11508b

File tree

2 files changed

+20
-27
lines changed

2 files changed

+20
-27
lines changed
-9.24 KB
Loading

app/pages/learn/01_tutorial/01_your-first-java-app/02_building-with-intellij-idea.md

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ more_learning:
1212
- H_XxH66lm3U
1313
- 70_B2DyM8mU
1414
toc:
15+
- Overview
1516
- Installing IntelliJ IDEA
1617
- Creating a new project
1718
- Writing and editing code
@@ -21,39 +22,38 @@ toc:
2122
- Refactoring code
2223
- Documenting code
2324
- Searching and navigating
24-
- Evolving the project
25-
- More information
25+
- Summary
2626
description: "Learn how to code, run, test, debug and document a Java application faster in IntelliJ IDEA."
27-
last_update: 2024-04-03
27+
last_update: 2024-04-04
2828
author: ["MaritvanDijk"]
2929
---
3030

31+
## Overview
3132
An IDE (Integrated Development Environment) allows you to quickly build applications, by integrating a source-code editor with the ability to compile and run your code, as well as integration with tools you’ll need for software development, including build tools, testing and debugging tools, version control, and so on. And finally, an IDE will let you search and navigate your codebase in ways your file system won’t.
3233

33-
IntelliJ IDEA is one of the [most widely used IDE for Java developers](https://www.jetbrains.com/lp/devecosystem-2023/java/#java_ide). It has out-of-the-box integrations with the tools a Java developer will need to start coding immediately, with no need to install any additional plugins.
34-
IntelliJ IDEA is available in two editions:
34+
One of the [most widely used integrated development environments (IDEs)](https://www.jetbrains.com/lp/devecosystem-2023/java/#java_ide) for Java is IntelliJ IDEA. Its user-friendly interface, rich feature set, and vast ecosystem make it an ideal environment for beginners to learn and grow as developers. In this tutorial you’ll learn how to use some of its features to simplify your development process and accelerate your learning curve with Java programming.
35+
36+
## Installing IntelliJ IDEA
37+
To install IntelliJ IDEA, download the version you want to use from the [IntelliJ IDEA website](https://www.jetbrains.com/idea/) and follow the instructions.
38+
Note that IntelliJ IDEA is available in two editions:
3539
- **_IntelliJ IDEA Community Edition_** - free and open-source. It provides all the basic features for Java development.
3640
- **_IntelliJ IDEA Ultimate_** - commercial, distributed with a 30-day trial period. It provides additional tools and features for web and enterprise development.
3741

38-
## Installing IntelliJ IDEA
39-
To install IntelliJ IDEA, download the version you want to use from the [IntelliJ IDEA website](https://www.jetbrains.com/idea/) and follow the instructions. For more information on installing IntelliJ IDEA on your OS, see [the documentation](https://www.jetbrains.com/help/idea/installation-guide.html#standalone).
42+
For this tutorial, you can download the Community Edition. For more information on installing IntelliJ IDEA on your OS, see [the documentation](https://www.jetbrains.com/help/idea/installation-guide.html#standalone).
4043

4144
When you launch IntelliJ IDEA for the first time, you’ll see the **Welcome** screen. From here, you create a new project, open an existing project, or get a project from a version control system (like GitHub).
4245

4346
[![Welcome screen](/assets/images/intellij-idea/welcome-screen.png)](/assets/images/intellij-idea/welcome-screen.png)
4447

45-
There is no need to install any additional plugins to get started; the most common integrations are already available as part of the IDE or as bundled plugins. Of course, you can [customize the IDE](https://www.jetbrains.com/help/idea/run-for-the-first-time.html#select-ui-theme) further, or [install additional plugins](https://www.jetbrains.com/help/idea/run-for-the-first-time.html#additional_plugins) if you really want to.
46-
47-
You will need to install a JDK, if you don’t already have one installed. You can do this yourself, as described in [Getting Started with Java](https://dev.java/learn/getting-started/#setting-up-jdk), or you can do so in IntelliJ IDEA when creating a new project, without having to switch from your IDE and other tools (such as your browser, file system, etc.) to download and configure a JDK.
48+
To start working with Java, you will need to install a JDK. You can do this yourself, as described in [Getting Started with Java](https://dev.java/learn/getting-started/#setting-up-jdk), or you can do so in IntelliJ IDEA when creating a new project, without having to switch from your IDE and other tools (such as your browser, file system, etc.) to download and configure a JDK.
4849

4950
## Creating a new project
50-
As mentioned above, we can create a new project from the **Welcome** screen. Alternatively, we can go to **File | New | Project** in the main menu.
51+
We can create a new project from the **Welcome** screen, or we can go to **File | New | Project** in the main menu.
5152

5253
[![New Project menu](/assets/images/intellij-idea/new-project-menu.png)](/assets/images/intellij-idea/new-project-menu.png)
5354

54-
In the **New Project** wizard, make sure that **New Project** is selected on the left hand side.
55-
56-
Give your project a name (for example `java-demo`) and make sure the selected **Language** is `Java`. Next, we'll select a **Build system**. IntelliJ IDEA supports both Maven and Gradle, the most used build systems for Java. A build tool, like Maven or Gradle, helps you to build your project, and manage any dependencies (like additional libraries) that you want to use in your Java code. Using a build tool will also make it easier to share your application and build it on a different machine. If you don't want to use either, you can use the IntelliJ build system. In this tutorial, let’s create a Maven project.
55+
In the **New Project** wizard, make sure that **Java** is selected on the left hand side, and give your project a name (for example, `java-demo`).
56+
Next, we'll select a **Build system**. IntelliJ IDEA supports both Maven and Gradle; the most used build systems for Java. A build tool, like Maven or Gradle, helps you to build your project, and manage any dependencies (like additional libraries) that you want to use in your Java code. Using a build tool will also make it easier to share your application and build it on a different machine. If you don't want to use either, you can use the IntelliJ build system. In this tutorial, let’s create a Maven project.
5757

5858
[![New Project](/assets/images/intellij-idea/new-project.png)](/assets/images/intellij-idea/new-project.png)
5959

@@ -84,7 +84,7 @@ Let’s add some code. We’ll start by creating a new class. In the **Project**
8484
[![New Java class](/assets/images/intellij-idea/new-java-class.png)](/assets/images/intellij-idea/new-java-class.png)
8585

8686
## Writing and editing code
87-
Inside the class `HelloWorld`, we will write the main method, which is where execution of our Java program will start.
87+
Inside the class `HelloWorld`, we will write the main method; which is where execution of our Java program will start.
8888
The classic way to write a main method in Java is:
8989
```java
9090
public static void main(String[] args) {
@@ -156,11 +156,11 @@ We can select a **Testing library** in the **Create test** popup.
156156

157157
[![Create test](/assets/images/intellij-idea/create-test.png)](/assets/images/intellij-idea/create-test.png)
158158

159-
IntelliJ IDEA supports multiple testing libraries, including [JUnit5](https://junit.org/junit5/), which is the [most used testing library for Java developers](https://www.jetbrains.com/lp/devecosystem-2023/java/#java_unittesting). If JUnit5 is not part of your project yet, IntelliJ IDEA will note “JUnit5 library not found in the module”. Click **Fix** to have IntelliJ IDEA fix this for you.
159+
IntelliJ IDEA supports multiple testing libraries, including [JUnit 5](https://junit.org/JUnit5/), which is the [most used testing library for Java developers](https://www.jetbrains.com/lp/devecosystem-2023/java/#java_unittesting). If JUnit 5 is not part of your project yet, IntelliJ IDEA will note “JUnit5 library not found in the module”. Click **Fix** to have IntelliJ IDEA fix this for you.
160160

161-
Note that the JUnit5 dependency is added to the `pom.xml` in the `<dependencies>` section.
161+
Note that the JUnit 5 dependency `junit-jupiter` is added to the `pom.xml` in the `<dependencies>` section.
162162

163-
[![JUnit5 dependencies](/assets/images/intellij-idea/junit5-dependencies.png)](/assets/images/intellij-idea/junit5-dependencies.png)
163+
[![JUnit5 dependencies](/assets/images/intellij-idea/JUnit5-dependencies.png)](/assets/images/intellij-idea/JUnit5-dependencies.png)
164164

165165
Go back to the test file to add tests. We can let IntelliJ IDEA help us generate our test for us. In the test class, we can use **Generate** (**⌘N** on macOS or **Alt+Insert** on Windows/Linux) and select **Test Method** to add a test. Give the test a name that explains the intended behavior, and add the relevant test code.
166166

@@ -256,14 +256,7 @@ Open Find in Files from the main menu using **Edit | Find | Find in Files**, or
256256

257257
[![Find in Files](/assets/images/intellij-idea/find-in-files.png)](/assets/images/intellij-idea/find-in-files.png)
258258

259-
## Evolving the project
259+
## Summary
260260
In this article, we’ve seen how IntelliJ IDEA can help you with code suggestions and completion while writing code, running your application, adding tests and using the debugger to help figure out how code is run, refactoring code, and more.
261261

262-
In the future, you might want to add more functionality to your project, and upgrade the Java version your project uses to take advantage of cool new language features.
263-
264-
IntelliJ IDEA continues to improve and evolve, adding new features and offering new integration. This includes inspections for new Java language features. [Feedback is welcome](https://youtrack.jetbrains.com/issues/IDEA).
265-
266-
[IntelliJ IDEA Community Edition](https://github.com/JetBrains/intellij-community) is an open-source project, and community contributions are welcome. Check the [contribution guide](https://github.com/JetBrains/intellij-community/blob/master/CONTRIBUTING.md) to contribute to IntelliJ IDEA, or the [IntelliJ Platform](https://plugins.jetbrains.com/docs/intellij/intellij-platform.html).
267-
268-
## More information
269-
For more information on IntelliJ IDEA, have a look at the [documentation](https://www.jetbrains.com/help/idea/getting-started.html), the [blog](https://blog.jetbrains.com/idea/), the [YouTube channel](https://www.youtube.com/intellijidea), or the [guide](https://www.jetbrains.com/guide/java/).
262+
IntelliJ IDEA continues to improve and evolve, adding new features and offering new integration. You can sharpen your coding skills by taking a look at the [documentation](https://www.jetbrains.com/help/idea/getting-started.html), [blog](https://blog.jetbrains.com/idea/), [YouTube channel](https://www.youtube.com/intellijidea), or [guide](https://www.jetbrains.com/guide/java/).

0 commit comments

Comments
 (0)