当我选择特定的 Tomcat(例如 tomcat8)时,Eclipse - 添加服务器 - 下一步按钮被禁用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31679099/
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:45:44  来源:igfitidea点击:

Eclipse - Add Server - Next Button is disabled when I select a specific Tomcat (e.g tomcat8)

eclipsetomcat

提问by ?smail Yavuz

I open Servers view, right click and go to new->server menu.

我打开服务器视图,右键单击并转到新建->服务器菜单。

When I select Tomcat 6 or Tomcat 7 the next button works well however when I select Tomcat 8 the next button is greyed out.

当我选择 Tomcat 6 或 Tomcat 7 时,下一个按钮运行良好,但是当我选择 Tomcat 8 时,下一个按钮变灰

How can I add a tomcat 8 in this case?

在这种情况下如何添加 tomcat 8?

回答by Computer Science Student

I'm using Ubuntu 14.04 and Eclipse mars2 and the accepted answer for this question didn't work for me. I tried everthing from installing new software (extensions, unnecessary because mars already have native support for tomcat8), and adding/removing runtime environments without success.

我正在使用 Ubuntu 14.04 和 Eclipse mars2,这个问题的公认答案对我不起作用。我尝试了安装新软件(扩展,不必要,因为 mars 已经具有对 tomcat8 的本机支持)以及添加/删除运行时环境但没有成功。

It is a bug into Eclipse.

这是 Eclipse 中的一个错误。

Here is the workaround that worked for me:

这是对我有用的解决方法:

Close Eclipse
In {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings delete the following two files:
    org.eclipse.wst.server.core.prefs
    org.eclipse.jst.server.tomcat.core.prefs
Restart Eclipse

Source:Eclipse add Tomcat 7 blank server name

来源:Eclipse 添加Tomcat 7空白服务器名

Eventhough it says tomcat 7, it worked for the same problem with tomcat 8 too.

尽管它说的是 tomcat 7,但它也适用于 tomcat 8 的相同问题。

回答by ?smail Yavuz

There are a few resource on the web about this problem but no answer on SO.

网上有一些关于这个问题的资源,但没有关于 SO 的答案。

If you were never add a tomcat8 to eclipse there would be no problem just like tomcat7 or tomcat6. But there is a setting about tomcat8 and that is wrong. In that menu there is no option to reconfigure settings.

如果你从来没有在 Eclipse 中添加一个 tomcat8,那么就不会像 tomcat7 或 tomcat6 那样有问题。但是有一个关于 tomcat8 的设置是错误的。在该菜单中没有重新配置设置的选项。

Just go to Window->Preferences->Server->Runtime Environmentsand Remove or Edit the old, wrong settings. Then you will be able to add tomcat8 too!

只需转到Window->Preferences->Server->Runtime Environments并删除或编辑旧的错误设置。然后你也可以添加 tomcat8 了!

Ref: http://www.codejava.net/servers/tomcat/how-to-add-tomcat-server-in-eclipse-ide

参考:http: //www.codejava.net/servers/tomcat/how-to-add-tomcat-server-in-eclipse-ide

回答by DilanG

It is a bug in Eclipse. You can follow following steps for overcome this problem.

这是 Eclipse 中的一个错误。您可以按照以下步骤来克服这个问题。

  • Close Eclipse

  • Go {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings

  • delete the following two files:

  • org.eclipse.wst.server.core.prefs

  • org.eclipse.jst.server.tomcat.core.prefs

  • Restart Eclipse

  • 关闭日食

  • 转到 {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings

  • 删除以下两个文件:

  • org.eclipse.wst.server.core.prefs

  • org.eclipse.jst.server.tomcat.core.prefs

  • 重启 Eclipse

回答by whoami

First try removing/editing respective server at

首先尝试删除/编辑相应的服务器

Window->Preferences->Server->Runtime Environments

窗口->首选项->服务器->运行时环境

then go ahead adding new server, Even after deleting old setup on Window->Preferences->Server->Runtime Environments- If you still have this issue while on Define a New Serverfrom servers tabof eclipse, now try adding tomcat at Window->Preferences->Server->Runtime Environmentsas we've deleted earlier & then go to Define a New Serverfrom servers tabto create new server, this should work.

然后继续添加新服务器,即使在Window->Preferences->Server->Runtime Environments上删除旧设置后- 如果在从Eclipse 的服务器选项卡定义新服务器时仍然遇到此问题,现在尝试在Window 中添加tomcat- >Preferences->Server->Runtime Environments正如我们之前删除的那样,然后从服务器选项卡转到定义新服务器以创建新服务器,这应该可以工作。

回答by Utsav Jain

Just go to Window->Preferences->Server->Runtime Environmentsand Remove the server. Try to add the server from there only. You will see another folder has been created with the same name. Provide valid path. Restart eclipse and add server from server console.

只需转到Window->Preferences->Server->Runtime Environments并删除服务器。尝试仅从那里添加服务器。您将看到已创建另一个同名文件夹。提供有效路径。重新启动 eclipse 并从服务器控制台添加服务器。

Hope it will help..

希望它会有所帮助..

回答by Laurent Grégtheitroade

I had this issue too, and it was caused by unsufficient file-access rightsto the Tomcat server installation directory.

我也有这个问题,它是由于对 Tomcat 服务器安装目录的文件访问权限不足造成的。

Make sure you have read-access to all files within the Tomcat installation directory you configured in Eclipse (this can be an issue for example if you use the standard tomcat installed in Ubuntu, if you do not belong to the tomcat8group).

确保您对在 Eclipse 中配置的 Tomcat 安装目录中的所有文件具有读访问权限(例如,如果您使用安装在 Ubuntu 中的标准 tomcat,如果您不属于该tomcat8组,这可能是一个问题)。