前言

老师们似乎都倾向于使用 Eclipse 作为 Java 开发的 IDE。其实作为工具效果都是一样的,但是使用方式却不太相同。所以只能浅浅折腾一下 Eclipse 的相关配置。


前期准备–相关软件下载

注意:以下 “最新官网下载链接” 提供的均为64位windows环境下的下载链接。Linux/Mac 请前往官网下载相对应软件

软件名 官网地址 最新版官网下载链接
Eclipse https://www.eclipse.org/ https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/2022-06/R/eclipse-jee-2022-06-R-win32-x86_64.zip
Oracle JDK https://www.oracle.com/ https://download.oracle.com/java/17/latest/jdk-17_windows-x64_bin.exe
Tomcat https://tomcat.apache.org/ https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.65/bin/apache-tomcat-9.0.65-windows-x64.zip
Maven https://maven.apache.org/ https://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.zip

配置 Oracle JDK

  1. 点击 Window -> Preferences -> Java -> Installed JREs

image-20220830104319669


  1. 点击 Add -> Standard VM -> Next

image-20220830104511607


  1. 点击 Directory… -> 选择你的Java安装位置 -> Finish

image-20220830104631629


  1. 勾选你刚配置的环境 -> Apply and Close

image-20220830104754072

至此,OracleJDK 环境配置完毕!


配置 Tomcat

  1. 点击 Window -> Preferences -> Server -> Runtime Environments -> Add

image-20220830105148828


  1. 点击 Apache -> Apache Tomcat v[版本号] -> Next

image-20220830105355537


  1. 点击 Browse… -> 选择你的 Tomcat 安装位置 -> JRE勾选刚刚配置的 -> Finish

image-20220830105608432


  1. 点击 Apply and Close

image-20220830105750264

至此,Tomcat 的环境配置完毕!


配置 Maven 并修改配置文件位置

  1. 点击 Window -> Preferences -> Maven -> Installations -> Add

image-20220830110030455


  1. 点击 Directory… -> 选择你的Maven安装位置 -> Finish

image-20220830110214468


  1. 点击 Window -> Preferences -> Maven -> User Settings -> Browse… -> 选择配置文件位置 -> Update Settings -> Apply and Close

注意:图一图二展示了配置文件所在位置 (都在Maven安装目录下)

image-20220830110624846

(图一)

image-20220830110639564

(图二)

image-20220830110422736

至此,Maven 环境配置完毕!接下来进行验证


验证. 点击 Window -> Show View -> Other… -> Maven -> Maven Repositories -> Open

image-20220830111354524

可以看到,Maven的本地仓库以及中央仓库都是配置文件中所设置的

image-20220830111458350


配置编辑器字体

  1. 点击 Window -> Preferences -> General -> Appearance -> Colors and Fonts -> Java -> Java Editor Text Font -> Edit

image-20220830111938887


  1. 编辑字体 -> 确定

image-20220830112140929

至此,编辑器字体修改完成!


配置控制台字体

  1. 点击 Window -> Preferences -> General -> Appearance -> Colors and Fonts -> Basic -> Text Font -> Edit

image-20220830112324235


  1. 编辑字体 -> 确定

image-20220830112502502

至此,控制台字体修改完成!


大功告成!