IDEA下载安装
一、IDEA
IDEA 全称IntelliJ IDEA,是java语言开发的集成环境,IntelliJ在业界被公认为最好的java开发工具之一,尤其在智能代码助手、代码自动提示、重构、J2EE支持、Ant、JUnit、CVS整合、代码审查、 创新的GUI设计等方面的功能可以说是超常的。IDEA是JetBrains公司的产品。
作为一名合格的程序猿,对于开发工具的选择也是很重要的,虽然我们常用 eclipse、myeclipse等开发工具就能满足目前的开发需求,毕竟每个公司的要求不一样,对于IDEA,建议大家可以试着去使用,不论从哪方面都优于上面两种开发工具,唯一一点可能IDEA对电脑配置是由要求的,毕竟大公司都基本上在使用IDEA,不多说了,我们一步一步来,首先来说IDEA的下载和安装过程。
二、IDEA 的下载及安装
打开IDEA的官网,如:http://www.jetbrains.com/ 然后到了主界面,点击下载如图:
![](https://upload-images.jianshu.io/upload_images/3711017-56145d43112fdb2a.png?imageMogr2/auto-orient/strip|imageView2/2/w/931)
我们这里下载zip的,将它下载到你要保存的目录下,其次解压。注意:(目录不能要中文和空格),我这里将它解压到F盘IDEA文件下:
![](https://upload-images.jianshu.io/upload_images/3711017-4e9f702c2107bb7e.png?imageMogr2/auto-orient/strip|imageView2/2/w/790)
上图为解压后的IDEA文件夹,然后我们打开bin文件夹:
![](https://upload-images.jianshu.io/upload_images/3711017-027fa5ee073645c8.png?imageMogr2/auto-orient/strip|imageView2/2/w/768)
三、IDEA的基本设置
1、打开IDEA,若初次使用,我们需要创建一个项目如图所示:
![](https://upload-images.jianshu.io/upload_images/3711017-86836618de904716.png?imageMogr2/auto-orient/strip|imageView2/2/w/1016)
点击Create New Project 会出现这个界面,此时我们需要创建一个空白项目,如图所示:
![](https://upload-images.jianshu.io/upload_images/3711017-b5bb24466b4ef0ac.png?imageMogr2/auto-orient/strip|imageView2/2/w/737)
然后一直点击next,直到finish如图所示:
![](https://upload-images.jianshu.io/upload_images/3711017-93be9ccc63bb80ec.png?imageMogr2/auto-orient/strip|imageView2/2/w/884)
接下来我们要配置jdk如图所示:
![](https://upload-images.jianshu.io/upload_images/3711017-aa4dc274ea0d40fd.png?imageMogr2/auto-orient/strip|imageView2/2/w/1030)
如图所示,先选择SDKs,然后选择+号点击ok会出现如下界面:
![](https://upload-images.jianshu.io/upload_images/3711017-f75c8840a26a24e0.png?imageMogr2/auto-orient/strip|imageView2/2/w/867)
然后将你jdk的位置添加进来,点击ok即可。此时还有最后一个配置,创建一个新module,如图所示:
![](https://upload-images.jianshu.io/upload_images/3711017-f5a7d60dbe0bb17f.png?imageMogr2/auto-orient/strip|imageView2/2/w/1054)
如初次创建modules时,Module Sdk这里应该是 no SDK,此时我们要选择如图所示的SDK即可。然后会出现这个界面:
![](https://upload-images.jianshu.io/upload_images/3711017-3f991822142b6021.png?imageMogr2/auto-orient/strip|imageView2/2/w/892)
![](https://upload-images.jianshu.io/upload_images/3711017-a04fb1f23b7624d0.png?imageMogr2/auto-orient/strip|imageView2/2/w/892)
然后点击finish就可以了,之后我们还要配置project如图所示:
![](https://upload-images.jianshu.io/upload_images/3711017-0ff310a1116f2ef4.png?imageMogr2/auto-orient/strip|imageView2/2/w/1125)
如图所示,点击OK即可,这样我们的IDEA就配置完成了,接下来就赶紧去试试hello world 吧!
四、IDEA的基本使用
我们来试着建一个项目吧,点击file - new- module如图所示:
![](https://upload-images.jianshu.io/upload_images/3711017-81441694f07285ca.png?imageMogr2/auto-orient/strip|imageView2/2/w/885)
点击finish即可,这样我们的项目就创建好了,然后右击项目名来建包名如图:
![](https://upload-images.jianshu.io/upload_images/3711017-e7500d5d206f360f.png?imageMogr2/auto-orient/strip|imageView2/2/w/555)
最后我们创建一个类就完成了,如图所示,项目结构:
![](https://upload-images.jianshu.io/upload_images/3711017-2b09aa3efe63d0b4.png?imageMogr2/auto-orient/strip|imageView2/2/w/959)
输出hello world 试试哦!如图所示:
![](https://upload-images.jianshu.io/upload_images/3711017-d4da0460d4fdf9e3.png?imageMogr2/auto-orient/strip|imageView2/2/w/1094)