Tomcat 9 and JDK 8 installation and configuration

Installation and Configuration 9 Tomcat

  1. Extracting archive, unzip my path: D: \ Program Files \ the Java


    Note: This tomcat compression package can not extract to the C disk, or because the C drive folder access permissions licensing issues, can not solve the DOS window behind garbled, and can not access the http: // localhost: 8080 /

    Download archive: https://www.jianguoyun.com/p/DQsHS8UQ6LnsBxiQpM4C

  2. Set the environment variables:
    win + → R & lt Input: sysdm.cpl → Advanced → Environment Variables → → New System Variables


    Variable name: CATALINA_HOME
    variable values: Click browse the directory to select the first step in the path to decompress

    System variables found inside the Path variable, Edit → New → input: % CATALINA_HOME% \ bin OK →


Installation and Configuration 8 JDK

  1. Double-click the icon → Next → Next → → Next Close

    JDK 8U131 Download: https://www.jianguoyun.com/p/DaIMZZ8Q6LnsBxiQsM4C







  2. Set the environment variables:
    win + → R & lt Input: sysdm.cpl → Advanced → Environment Variables → → New System Variables

    Variable name: JAVA_HOME
    variable value: C: \ Program Files \ Java \ jdk1.8.0_131

    System variables found inside the Path variable, Edit → New → input: % JAVA_HOME% \ bin OK →


  3. DOS窗口查看:win+R → cmd → java -version

Tomcat 9启动后DOS窗口乱码问题

  1. win+R → cmd → startup.bat,发现Tomcat已经启动,但是窗口出现了乱码问题


  2. 找到Tomcat解压缩的目录,进入 conf 目录,找到 logging.properties 文件,打开



    这里选择用的 notepad++ 打开



    将图示中的 UTF-8 改成 GBK 即可


  3. DOS窗口内启动Tomcat:win+R→ cmd→ shutdown.bat→ startup.bat

    发现DOS窗口乱码问题已经解决


  4. DOS窗口不要关闭,浏览器访问:http://localhost:8080,成功


Guess you like

Origin www.cnblogs.com/JRdong/p/12231235.html