Tải bản đầy đủ (.pdf) (34 trang)

2 intellij IDEA 14 basic guideline

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.38 MB, 34 trang )

IntelliJ IDEA Introduction
Getting started with IntelliJ IDEA 14.1


General Information
Version

1.0.0

Date

25.07.2016

Author

Phat H. Vu

Classification

Internal / Confidential / Public / Not classified

Status

On work/ Draft / Released

Version control
Date

Version

Author



Description

25.07.16

1.0.0

Phat H. Vu

Documentation initialization


1

Overview

IntelliJ IDEA is a Java integrated development environment (IDE) for developing computer
software. It is developed by JetBrains.
Home page: />Version: Community (Free) and Ultimate (Commercial License)
The version I highly recommend: IntelliJ IDEA Ultimate 14.1.7. Download from here
In this guideline, you will go throws the following stuffs:







Installation
Create & run the first Java application

Change some default settings
Debug
How to open & create a Maven project.
Some additional tips


2

Installation

Guideline: />Do the following steps:

You can enter your license key, or evaluate for free for 30 days:


Set UI theme. You can change this setting later:


For example, I select Darcula theme:


Next steps, we should configure plug-ins. We should disable some plug-ins that we will not use.
That could make the IDE run faster. Click on Next:Features plugins button to continue.


You can refer the following plug-ins. Of course, you can choose by your-self. And, we can
change this setting later.






3

Create and run the first Java application in IntelliJ IDEA 14

Let’s create the first Java project with the IDE:


Firstly, we need to set up JDK. Specify location of your JDK (not JRE):



You’ve created a sample Java project in the IDE:


Then, try to run it. Right click on Main class, and then select ‘Run Main’:


Great, you can see the running output at the Console window (at the bottom of the IDE):


4

Change default settings

You should show the Toolbar & Tool Buttons, so you can access some features from this
toolbar:



You can change more settings by go to File > Settings:


Should show line numbers:

Then, you can see the line number at the left side of every source code / file:


You should enable Autoscroll to Source and Autoscroll from Source. So, when you open
any file/source code, in the left side (Project), location of this file/source code will be navigated:

There is a Terminal window, where you can execute commands directly from the IDE. No need
to open CMD to execute commands:


5

Debug

The IDE supports very good in debugging. Double click on any line of your source code to set
break points.

Then, run the Debug. For example, right click on Main class, select Debug ‘Main’:


The IDE will stop at break points. You can see directly value of variables, also of expressions.
You able to evaluate an expression or a variable, by pressing Alt+F8:


There are 2 different consoles, one for Run and another one for Debug



6

Maven

Set Maven home directory. Select your Maven installation. Example below, the directory got
from M2_HOME value (D:/Tools/maven)


×