[JAVA] Try using IntelliJ IDEA once

An entry that tells me about my uncle's favorite ** IntelliJ IDEA **.

It's my first time to put * gif, and I feel a lot of disappointment. I'll fix it someday. *

What is IntelliJ IDEA?

Czech-based ** JetBrains IDE ** (Integrated Development Environment) for Java. It features powerful input completion and refactoring functions, and is said to be the most popular Java development environment in the 2016 survey.

There is a paid version of IntelliJ IDEA Ultimate and a free and open source IntelliJ IDEA Community. Android Studio, which is the official Android IDE, is also based on IntelliJ IDEA because it is open source, and it has the same usability and so on. Recently, Android Studio has joined the JetBrains Toolbox, which allows you to centrally manage the JetBrains IDE.

IntelliJ IDEA is for Java, but there are also Rider for .NET languages such as C # and PhpStorm for PHP. Both are charged (reasonably expensive). There is a free version of PyCharm for Python. Use it?

If you are a student, you can use everything for free. The magical ** student license is fairly easy to obtain **, so please try it.

Here's what IntelliJ IDEA is ...

I personally like the following four points

--Can be used on Win / Mac / Linux --Easy to build environment --Git etc. are supported by IDE --The function that generates constructors etc. is the best

You have to install a plug-in like Visual Studio Code ... or something like that, and if you install it, you can use it immediately. Since it is automatically saved when you make changes to the source file, it is common in Visual Studio (I think) I forget to save → Build does not occur.

Once you get used to IntelliJ IDEA, you'll have to do this, so I hope everyone will.

If you force yourself to say something wrong ...

--Slow startup ――Slightly heavy --Japanese is not supported

Overcome with machine power and spirit.

Let's install

Java execution environment and JDK are required as prerequisites for running IntelliJ IDEA, so please install them.

You can install only IntelliJ IDEA, or you can install it from JetBrains ToolBox, which allows you to centrally manage the JetBrains IDE.

Install only IntelliJ IDEA

You can install IntelliJ IDEA alone by downloading it from here. If you start the installer, you should be able to install it properly.

Download IntelliJ IDEA: The Java IDE for Professional Developers by JetBrains

Install from JetBrains Toolbox

What is JetBrains Toolbox?

image.png

With JetBrains ToolBox, you can easily install, launch, and update your IDE. Project files opened in the JetBrains IDE are also listed, saving you the trouble of searching for them in Explorer and double-clicking them. Also, since I notice that the update is coming before starting the IDE, ** "I wonder if I have to update and restart even though I started it, I'm withered" phenomenon ** is unlikely to occur. The best.

Installation

You can download it here. If you start the installer, you should be able to install it properly.

Toolbox App: Easily Manage JetBrains Product Updates

After installing Toolbox, install IntelliJ IDEA Community from ʻAVAILABLE TOOLS`.

The paid version is also listed, but if you use it for a month, you will be forced to purchase it, so install the free version quietly. I've used both Community and Ultimate, but the free version does the basics without any inconvenience. You did it!

Hello, IntelliJ IDEA. When you start IntelliJ IDEA, you will be asked something like ** "I ... white is better? Black is better?" **, so please choose the one you like and proceed steadily. Do you have any additional add-ons? But you can add it later and it works normally, so don't put anything in it and go to the next.

Then, it will look like the top page, so click ** Create New Project **.

image.png

Create a new project

For the time being, select Java and Next. The next screen is also Next without any particular tweaking. On the next screen, select the project name and directory of your choice and Finish.

How to read the screen

image.png

You can see the file tree in the Project tab in the upper left. Here, create class files and directories.

Let's try creating a Java class file. You can create a class file by right-clicking on the src directory under the project directory and selecting New> Java Class.

image.png

When you create a class file, an editor will appear on the right. I will write a program here.

Let's use convenient functions

Code generation

Let IntelliJ IDEA write the code. Choose Code> Generate from the stripe menu or use keyboard shortcuts. Ctrl + Alt + Insert for Windows / Linux, ⌘ + N for Mac.

ダウンロード.gif

Right? Is it convenient? In addition to the constructor, you can also generate override methods and getters / setters.

Jump

You can jump to the method pointed to by the cursor. Hold down the Ctrl key on Windows / Linux and the ⌘ key on Mac and click the method name or class name you want to jump to.

ダウンロード (1).gif

If you're wondering what this guy is doing ...?, You can easily go see it with this.

Refactor

With Shift + F6, you can change variable names, method names, class names, etc., including all dependencies.

hoge.gif

You can fix embarrassing Typo right away.

Step execution

You can add a breakpoint by clicking just next to the line number. If you debug with this, you can stop the operation at that line and see the value of the variable in that state.

Right-click and select Debug to debug.

step.gif

I wonder if it will be useful when I am suffering from an incomprehensible error. Step execution can also be done with NetBeans.

Various other

When using Git etc., you can do it from VCS in the stripe menu.

To execute it, right-click the file with the main () method in the editor and select Run to build and execute it.

Finally

By mastering IntelliJ IDEA, you can program faster, more accurately, and more comfortably. Please use it by all means.

Recommended Posts

Try using IntelliJ IDEA once
Try using libGDX
Try using Maven
Try using powermock-mockito2-2.0.2
Try using GraalVM
Try using jmockit 1.48
Try using SwiftLint
Try using Log4j 2.0
IntelliJ IDEA settings
Create a Spring Boot application using IntelliJ IDEA
I tried using the profiler of IntelliJ IDEA
Try using Axon Framework
Try using JobScheduler's REST-API
Try using java.lang.Math methods
Try using Talend Part 2
Try using Talend Part 1
Try using F # list
Try using each_with_index method
Try using Spring JDBC
Try using RocksDB in Java
Try using GloVe with Deeplearning4j
Try using view_component with rails
Try scraping using java [Notes]
Try using Cocoa from Ruby
Try using letter_opener_web for inquiries
Write Processing in IntelliJ IDEA
[Swift] Try using Collection View
[IntelliJ IDEA] Perform Unit Test
Hot deploy with IntelliJ IDEA
Try using Spring Boot Security
Try using gRPC in Ruby
[Rails] Try using Faraday middleware
[Processing] Try using GT Force.
[Programming Encyclopedia] §2 Try using Ruby
People using docker Try using docker-compose
Recognize Rails projects with Intellij idea
Try using Redis with Java (jar)
[Java] Try to implement using generics
Try using the messaging system Pulsar
Try using IBM Java method tracing
Java + OpenCV 3.X in IntelliJ IDEA
Try using Hyperledger Iroha's Java SDK
[Java] Where did you try using java?