This article is an operation document for configuring jdk and maven under the premise that IDEAL has been installed.
1, Download and configure JDK and Maven
Mac Download and configure the JDK method:
For details, see MacInstall JDK< strong>and JMeter5-install JDK
Mac download and configure Maven method:
Open Maven official website to download Page: https://maven.apache.org/download.cgi
Download: apache-maven-3.6.1-bin.tar.gz
Unzip: put the downloaded installation package in a directory, such as: /Users/xxx/Documents/maven
Configure environment variables:
#Open the terminel and enter the following command
$vim ~/.bash_profile #Open the .bash_profile file
export M2_HOME=/ Users/xxx/Documents/maven/apache-maven-3.6.1
export PATH=$PATH:$M2_HOME/bin
add Then save and exit, execute the following command to make the configuration effective:
$source ~/.bash_profile
$mvn -v#Check whether the configuration It takes effect. If you see Apache Maven 3.6.1, it means the configuration is successful.
2, Configure JDK and Maven in IDEAL
Configuring JDK in IDEAL is very simple, just follow the steps below:< /p>
Open IDEAL, select File->New->Project…
Click on Java and see the installed jdk version in the Project SDK. Click Next
< strong>Select the java sample Java Hello World
p>
public class Main {
public static void main(String[] args) {
System. out.println(“Hello World!”);
}
}
Right-click Run’Main’ to view the console data printing. Just print out Hello World!.
Maven is configured in IDEAL :
Enter the decompressed maven directory, conf->settings.xml, select a local directory in this file as the Maven local warehouse to configure the local warehouse path. In this way, the Maven tool is installed and configured.
in Intellij Setting up Maven in IDEA:
Open IDEA and select File->Other Settings->Default Settings
Enter maven in the search box, in
You can also check some options and enter Importing
————————————————- —–Tanwheey——————————————– —————————–
Love life, love work.