Installation & Configuration ideaIU, Apache Tomcat, JDK (IDEA console output to solve garbled)

Vigor long time did not update the blog, 2019.4. 9th from work colleagues take the car, colleagues, others lead to rear-end her husband Vigor right arm fracture, cultivation has not been recovered. The company says to use ideaIU develop Java. Left hand has been busy for the afternoon was not ready, left-handed Vigor decided to write a blog and share with the students.

Installation Outline:

1. Installation ideaIU;

2. Installation and configuration the JDK;

3. Installation and Configuration Tomcat;

A first follow Vigor to install ideaIU

1. Download ideaIU:

i) You can use Vigor direct download network disk: link: https://pan.baidu.com/s/1XlKfjgeBRC3KweEfpM_VBw, extraction code: 7lro.

ii) Open the idea official website to download: https://www.jetbrains.com/idea/download/#section=windows, note that there may be some slow to open, or you can use vpn to github download and install a "blue light", or slowly waiting to open the page. Figure:

2. After downloading click to install, no need to say this, see screenshots;

 

 

 

 

Subsequent installation and theme selection Vigor is not a screenshot, Vigor left hand to write blog really difficult.

3. Install ideaIU final step activation, we can Baidu registration code, Kuanye can buy directly with a knife, you can use the following URL generation Vigor License:

http://idea.lanyus.com/

 The registration code obtained according to the above FIG operation:

ideaIU get.

4. Chinese IDEA Console solve garbage problem:

But do not be happy too early, up to here does the installation was successful, but only later and so we ran up to find information on the console of all Chinese all garbled output, unlike Android Studio as plain English prompts, IDEA console output information in Chinese displayed in Chinese, and because the default configuration Chinese distortion problems cause the console, as shown below:

 

当威哥跑第一个jsp例子时,看的控制台这堆乱码,威哥崩溃了,什么鬼东东。现在和大家分享下如何解决IDEA控制台乱码问题。

i)桌面找到idea的图标,点击鼠标右键---》属性---》打开文件所在位置,即idea安装位置下的bin目录;

ii)找到idea64.exe.vmoptions文件(32位系统请找idea32.exe.vmoptions),右键记事本打开,在文件最后追加:

-Dfile.encoding=UTF-8。

如下图:

OK,解决了,童靴们再来看威哥运行截图,终于解决了IDEA控制台的乱码问题:

二、安装&配置JDK:

1.下载jdk,https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html,威哥使用的jdk8,其他版本同学们自己选择下载。

2.安装jdk时,安装过程中会出现两次 安装提示 。第一次是安装 jdk ,第二次是安装 jre 。建议两个都安装在同一个java文件夹中的不同文件夹中。(不能都安装在java文件夹的根目录下,jdk和jre安装在同一文件夹会出错)

威哥是这样安装的:

 

3.安装完JDK后配置环境变量:

i)计算机→属性→高级系统设置→高级→环境变量

 

 

 

 ii)系统变量→新建 JAVA_HOME 变量

变量值填写jdk的安装目录(威哥是 :D:\Program Files\Java\jdk1.8.0_211)

 

3.系统变量→寻找 Path 变量→编辑

在变量值最后输入 %JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;

(注意原来Path的变量值末尾有没有;号,如果没有,先输入;号再输入上面的代码),

以上是非win10的配置,但是威哥是Win10,见下图:

 

4.系统变量→新建 CLASSPATH 变量

变量值填写   .;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar(注意最前面有一点)

 

 5.检验是否配置成功

运行cmd 输入 java -version (java 和 -version 之间有空格),威哥使用PowerShell

若如图所示 显示版本信息 则说明安装和配置成功。

 

 

三、安装&配置tomcat:

1.下载tomcat:

i)威哥百度网盘,链接:https://pan.baidu.com/s/1XPo3llWfnpFnD4b6YMWKZg,提取码:bhht

ii)官网下载:https://tomcat.apache.org/download-80.cgi,如图 :

 

2.点击下载下来的tomcat安装exe程序,威哥不截图操作了,马上23点了,威哥明天还要早起去医院拍片看看胳膊骨折愈合情况。

3.配置tomcat环境变量:

i)参照上面打开“环境变量”;

ii)在"系统变量"里新建变量名:CATALINA_BASE,变量值:你的tomcat安装路径,威哥如下:

iii)在"系统变量"里新建变量名:CATALINA_HOME,变量值:你的tomcat安装路径,威哥如下:

iv)在"系统变量"里打开Path变量,添加变量值:%CATALINA_HOME%\lib;%CATALINA_HOME%\bin(有些电脑无需配置此步骤便可完成)

v)重启电脑

vi)检测环境变量是否配置成功,打开cmd,当然,威哥还是使用PowerShell,输入:startup。如果和威哥一样,则OK.

 

vii)测试Tomcat是否启动成功,

在浏览器地址栏输入http://localhost:8080/,如果出现威哥下面截图,则OK.

真累啊,左手好不容易花了5个小时写完这篇博客。希望同学们能够祝福威哥早日康复,哈哈。

 

Guess you like

Origin blog.csdn.net/xuwei_net/article/details/90948298
Recommended