Files
course/eclipse.md
王鹏 5597ca12de init
2025-08-14 14:46:45 +08:00

28 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#### eclipse导入Maven项目
1. 右键 -> import -> Maven -> Existing Maven Projects
2. 选择项路径,导入成功
#### 配置JDK以jdk1.8为例)
1. 右键项目 -> Propertis -> Java Build Path
2. Libraries 中是项目所有的依赖显示红叉的remove掉。
3. JRE System Library 和 Server Library 都remove掉
4. Add Library -> JRE System Library -> Alternate JRE 选择jdk1.8。如果没有,选择 Installed JRES...选择本机jdk1.8的安装路径需要先安装jdk1.8
5. 选完finish就ok了
#### 配置Java Compiler
1. 右键项目 -> Propertis -> Java Compiler
2. Compiler compliance level -> 1.8
#### 配置Tomcat
1. Window -> Preference -> Runtime Environments -> Add
2. 选择 Apache -> Apache Tomcat v8.0
3. 选择tomcat安装路径JRE选择1.8
4. eclipse配置tomcat就ok了还需要配置到项目中
5. 右键项目 -> Propertis -> Java Build Path -> Libraries
6. Add Library -> Server Runtime -> 选择刚才配置好的tomcat就ok了
#### 运行项目
1. 导入好数据库脚本
2. 修改项目中数据库连接的用户名和密码
3. 右键项目 -> Run As -> Run on Server 选择Tomcat8运行
4. 访问 `http://localhost:8080/项目名/`