eclipse 重装系统后“指定的Tomcat安装目录不存在”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27205165/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 22:15:16  来源:igfitidea点击:

"The specified Tomcat installation directory does not exist" after reinstalling system

javaeclipsetomcatjakarta-eetomcat7

提问by Jaskey

I just reinstall my windows7 system, and now my project in eclipse can not run on the local Tomcat Server.

我刚刚重装了我的windows7系统,现在我在eclipse中的项目在本地Tomcat Server上无法运行。

I have the error when I try to start the server.

当我尝试启动服务器时出现错误。

The specified Tomcat installation directory does not exist.

enter image description here

在此处输入图片说明

How can I change the director of tomcat to run. For some reason, my disk E where install tomcat now becomes disk D. This mess up in eclipse.

如何更改tomcat的director运行。出于某种原因,我安装 tomcat 的磁盘 E 现在变成了磁盘 D。这在 eclipse 中搞砸了。

回答by A4L

I guess your workspace still remembers paths relative the drive Ethat no longer work now because it has become D.

我猜你的工作区仍然记得相对于E现在不再工作的驱动器的路径,因为它已经变成了D.

You could just go in eclipse into

你可以在日食中进入

Window > Preferences > Server > Runtime Environment 

remove the broken server and re-add it. Right click on your project to run on serverand choose the newly created one.

删除损坏的服务器并重新添加它。右键单击您的项目run on server并选择新创建的项目。

However, since you have installed stuff on Ewhich now is Dyou might run into other problems, therefore I would suggest relabeling the drive, to do so please go to:

但是,由于您已经安装了E现在D可能会遇到其他问题的东西,因此我建议重新标记驱动器,为此请访问:

Control Panel > System and Security > Administrative Tools > Computer Management

Then click on Disk Managementunder Storage. Right click on the partition now labeled Dand choose Change Drive Letter and Path...and apply the changes you need, i.e relabel it with E.

然后点击Disk ManagementStorage。右键单击现在标记的分区,D然后选择Change Drive Letter and Path...并应用您需要的更改,即用 重新标记它E

回答by Jaskey

Found solution:

找到解决方案:

In the Serverstab double click on the tomcat server. In the General Informationclick on Runtime Environmentthen browse to the Tomcat installation directory, click Finish

Servers选项卡中双击 tomcat 服务器。在General Information点击Runtime Environment然后浏览到Tomcat安装目录,点击Finish

回答by Sourabh

Try the following steps:
Go to Window --> Preferences --> Server --> Runtime Environments

尝试以下步骤:
转到窗口 --> 首选项 --> 服务器 --> 运行时环境

Under Server Runtime Environments, select the server configuration which is throwing the error and click on Edit.

在 Server Runtime Environments 下,选择引发错误的服务器配置,然后单击 Edit。

Set the appropriate Tomcat Installation Directory by clicking Browse and choosing the tomcat directory.
Finally click Finish.

通过单击浏览并选择 tomcat 目录来设置适当的 Tomcat 安装目录。
最后点击完成。

Then restart the server by running the project on server.

然后通过在服务器上运行项目来重新启动服务器。

回答by Rana Pratap Singh

1.To install tomcat7 in ubuntu. Go to lib folderand create a new folder with desired name like Tomcat7and give all permission to this folder.

1.在ubuntu下安装tomcat7。转到lib 文件夹并创建一个具有所需名称的新文件夹,例如Tomcat7并授予该文件夹的所有权限。

  1. Go to eclipse, select your project and click on Window->prefrences->serve->runtime enviormentsand click on add button and select tomcat then press next, afterward a dialog will open and select the folder which one you had created in lib folderthen press download and install button.

  2. It will take few minute to download and after few minutes project is read to run with tomcat in eclipse.

  1. 转到 eclipse,选择您的项目并单击Window->prefrences->serve->runtime 环境,然后单击添加按钮并选择 tomcat 然后按下一步,随后将打开一个对话框并选择您在lib 文件夹中创建的文件夹然后按下载并安装按钮

  2. 下载需要几分钟,几分钟后项目被读取以在 Eclipse 中与 tomcat 一起运行。

回答by T.Ahmed

It took me all day looking for the solution. But it was simple just double click the tomcat 9.0 then it will tell you you do not have permission to open and promote you to continue. click continue. then will solve the problem.

我花了一整天寻找解决方案。但是很简单,只要双击tomcat 9.0,它就会告诉您没有权限打开并让您继续。点击继续。那么将解决问题。