如何在Eclipse配置服务器与新建项目进行运行
如何做到在Eclipse配置服务器与新建项目进行运行呢?下面是小编跟大家分享的是如何在Eclipse配置服务器与新建项目进行运行,欢迎大家来阅读学习~
在Eclipse配置服务器与新建项目进行运行
工具/原料
Eclipse
Tomcat
方法/步骤
1这里以配置Tomcat 6.0为例子,打开Eclipse

2选择Server下面的Runtime Environments:

3点击右边的“Add”按钮,进“New Server Runtime Environment”对话框,选择我们要配置的Tomcat版本,这里选用了Tomcat v6.0,注意要与你下载的版本一致。

4Next后进入下图:

在Tomcat installation directory右边的Browse按钮,点击它,进入本地磁盘目录,选择你的Tomcat安装目录,如下:

确定后,回到刚才那个对话框,点击JRE右边的Installed JREs按钮,进入下图的界面:

如果这里已经配置了JDK,则直接选择即行,如果没有配置的话,就点右边的“Add”,添加一个标准的JRE

Next,下图,点右边的Directgry浏览本地文件系统,找到JDK的安装目录。

好,确定 – finish,下一步,完成。如下图:

项目的新建、添加jar包、运行;一般我们用这个工具来做Web项目,就建一个动态Web工程吧:

进入下图界面,在Project name中输入工程名,这里起名为“HelloWorld”,在Target runtime中选择刚才我们配置的Tomcat 6.0服务器。如下图:

关于如何把外部的jar包引进我们的项目中来,这个其实很简单,复制那些jar文件,在下图的lib目录下右键粘贴即行。

关于如何运行Web项目,Eclipse for JavaEE与MyEclipse的做法不同

进入下图,找到我们配置的服务器:

15Next – > finish即行。
如何在Ecli