Intellij idea tutorial

Source: Internet
Author: User

Intellij idea tutorial

First of all, in intellij idea, "new project" is equivalent to "workspace" of eclipse, and "new module" is used to create a project.

 

This section is taken from Yifeng's blog
He is correct, but in my past two years of idea development experience, I think idea wants you to have a project in a "workspace. When I was using ecipse in college, most people had a "workspace" with many projects. They didn't need to be closed, but only one of them was enabled, these two excellent ides are very different in this regard.

In idea, "new project" automatically creates a project (if you keep following the standardProgramThe name is the same as that of your workspace (first). If you create another project (second) in the workspace ), the root directory of the seconde project will be in the same level as the first web, SRC, and out directories. Although this is correct, I strongly recommend that you only have one project in one space (also the idea standard method ).

Idea built the project, you can not see the output directory, you can only see SRC, web, and the WEB-INF under the classes, Lib, none. However, when you open the disk, you can find that there are three out directories: exploded, production, test,
Exploded: it is your real Web output directory. Idea gave you an alias named xxxxweb, which everyone is familiar with and has everything.
Production: the output of all. class files is in this
Test: Test class and resource file output directory.

Idea Construction Skills
1. First, you need to check the new project ---> Create project from scratch ---> next ----> check box web application. Of course, you need to check other items -----> finish
This is basically everyone.

2. now that you have a standard directory, configure Tomcat with a downward arrow on it. Click Edit configurations, ------> the "+" sign in the upper left corner ------> tomcatserver ---> Local ----> name ----> choose Application Server -----> Configure ----> select Tomcat path ----> remove the check box of start browser ----> remove the check box in the lower left corner, choose fix -----> apply --> OK in the lower right corner.

3. go to your disk, open your new project, find E: \ test \ WEB \ WEB-INF (assuming the project is named test), manually create two folders in the WEB-INF, named classes and Lib.

4. back to idea, right-click your space ----> Module Settings ---- 2nd Select Test ---> paths -----> use module compile output path -----> output path select the classes you just created on the disk.

5. choose Java EE bulid Settings> Create web module exploded directory on the right and select the web path of your program (E: \ test \ WEB)
The check box of the exclude from module content below should be wiped out. If you do not kill your web, it will be gone in idea.

6. Add Lib, or the vertical bar of 2nd ----> Web -----> select dependencies on the right ---> Add ----> module library
----> Attach jar directories ---> select the Lib created manually in the directory.

Finally, we are done.
Now, as long as the jar package is copied to the lib directory you have created manually, idea will be imported automatically. Every time you switch back to idea, it will be displayed. Now you have changed the JSP, it does not need to be saved or compiled any more, greatly increasing the development efficiency.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.