A friend recently asked me about how to create a Java project with IDEA. It happened that the editor did not start playing IDEA after the Java environment was configured last time. This time, I will try it.
First of all, we need to write a good IDEA. First, go to jetBrains’ official website: www.jetbrains.com to find the IDEA under Tools, click on it to find Download, and then Download the page to find the version of your own computer system:
You can use the community version for the first time, if it is the Windows system xiaobian recommended under the ZIP version, after decompression directly into the folder can not use the EXE version of the main reason is less change to the system, such as what registry and so on.
Clion: Clion2020.1 Clion: Clion2020.1 Clion: Clion2020.1 Clion: Clion2020.1 Clion: Clion2020.1 Clion: Clion2020.1
Or directly install exe version can also be installed, after the installation is completed, open IDEA:
To create a Java project, go to File- > New- > Project:
In the circled part of the above figure, find the JDK file you have installed, and then select the JDK version. Then proceed to the next step: Select your project name and save path in this figure, and click Finish:
Once the project is complete, we can start creating a new Java file. In the professional version of IDEA2020.2.2 (you can skip to creating a New Java file in the community version), creating a Java file requires configuring yourself. Right-click the Test project in the image below, go to addFrameworksupport, and click…
Click addFrameworksupport… In the page that appears, check what is checked in the upper and lower pictures, and finally OK (wait for it to complete download) :
Finally, create a New Java file!
Create a new package as shown in the following image and give the package a name.
Right-click the new package, select New – > Javaclass, and name it.
Copy and paste the following code input:
package test;
public class test { public static void main(String[] args) {
System.out.println("helloworld"); }}
Copy the code
Run as follows:
Create the project using IDEA and run Helloworld