是否可以在 eclipse indigo 中使用 tomcat 7.0.20?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7171244/
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
Is it possible to use tomcat 7.0.20 within eclipse indigo?
提问by maxqua72
While installing the new eclipse indigo IDE I've tried to setup the tomcat server previously downloaded from Apache web site (tomcat 7.0.20) with no success. When I fill the tomcat directory in the form it causes an error to appear saying the version I chosen is not valid. It also suggests to download the tomcat version 7.0.12. Why? Is there a way to use the latest version of tomcat with indigo eclipse? Is there a compatibility problem with version newer than 7.0.12?
在安装新的 eclipse indigo IDE 时,我尝试设置之前从 Apache 网站(tomcat 7.0.20)下载的 tomcat 服务器,但没有成功。当我在表单中填写 tomcat 目录时,它会导致出现错误,指出我选择的版本无效。它还建议下载 tomcat 版本 7.0.12。为什么?有没有办法在indigo eclipse中使用最新版本的tomcat?7.0.12 之后的版本是否存在兼容性问题?
I downloaded the windows 64bit version of tomcat 7.0.20, but using an old 7.0.16 I already had the result is the same.
我下载了 tomcat 7.0.20 的 windows 64 位版本,但是使用旧的 7.0.16 我已经得到了结果是一样的。
回答by Barney
I think the invalid version message is a bit misleading; it just doesn't like something about the installation. Anyway, here's what worked for me, using Ubuntu 11.10, eclipse Indigo JavaEE SR2, tomcat 7.0.21.
我认为无效版本消息有点误导;它只是不喜欢有关安装的某些内容。无论如何,这对我有用,使用 Ubuntu 11.10,eclipse Indigo JavaEE SR2,tomcat 7.0.21。
I have a standalone tomcat installation as per the standard ubuntu tomcat7 package. I used tomcat7-instance-create to create a separate tomcat instance for eclipse:
根据标准的 ubuntu tomcat7 包,我有一个独立的 tomcat 安装。我使用 tomcat7-instance-create 为 eclipse 创建了一个单独的 tomcat 实例:
$ tomcat7-instance-create -p 8000 -c 8003 ~/dev/eclipse/tomcat
This required a few additions to keep eclipse happy
这需要添加一些东西才能让 eclipse 开心
$ cd ~/dev/eclipse/tomcat
$ ln -s /usr/share/tomcat7/lib
$ ln -s /var/lib/tomcat7/conf/policy.d/03catalina.policy conf/catalina.policy
$ ln -s /usr/share/tomcat7/bin/bootstrap.jar bin/bootstrap.jar
$ ln -s /usr/share/tomcat7/bin/tomcat-juli.jar bin/tomcat-juli.jar
$ tree
.
├── bin
│?? ├── bootstrap.jar -> /usr/share/tomcat7/bin/bootstrap.jar
│?? ├── setenv.sh
│?? ├── shutdown.sh
│?? ├── startup.sh
│?? └── tomcat-juli.jar -> /usr/share/tomcat7/bin/tomcat-juli.jar
├── conf
│?? ├── catalina.policy -> /var/lib/tomcat7/conf/policy.d/03catalina.policy
│?? ├── catalina.properties
│?? ├── context.xml
│?? ├── logging.properties
│?? ├── server.xml
│?? ├── tomcat-users.xml
│?? └── web.xml
├── lib -> /usr/share/tomcat7/lib
├── logs
├── temp
├── webapps
└── work
Then just add a new runtime environment and server as normal, and it's all good!
然后像往常一样添加一个新的运行时环境和服务器,一切都很好!
HTH,
哈,
回答by user833970
I found this page amazingly helpful
我发现这个页面非常有用
Also a lot of my problems went away when I switched from Elipse Classic to Eclipse Java EE IDE for Web Developers.
当我从 Elipse Classic 切换到面向 Web 开发人员的 Eclipse Java EE IDE 时,我的很多问题都消失了。
回答by Aryan
Launch eclipse, goto Window / Preferences / Server / Runtime and add Tomcat installation directory. This registers Tomcat with Eclipse Indigo.
启动eclipse,进入Window/Preferences/Server/Runtime,添加Tomcat安装目录。这会将 Tomcat 注册到 Eclipse Indigo。
It seems that there is no Helios version for Mac, only Indigo.
Mac 好像没有 Helios 版本,只有 Indigo。
回答by Buhake Sindi
I've downloaded Eclipse for Java EE developers (Eclipse Indigo 64 bit, running JDK 1.6.0_25 64 bit) and I've successfully added Tomcat 7.0.20 as a server (and Tomcat 7.0 for Windows). Unless you specify the error logs, there is no problem whatsoever.
我已经为 Java EE 开发人员下载了 Eclipse(Eclipse Indigo 64 位,运行 JDK 1.6.0_25 64 位)并且我已经成功地将 Tomcat 7.0.20 添加为服务器(以及用于 Windows 的 Tomcat 7.0)。除非您指定错误日志,否则没有任何问题。
回答by nitind
Eclipse can't use an installed copy, and that's what it sounds like you've got. Installed copies usually have their libraries and configuration files scattered in unpredictable ways that make it difficult/impossible for Eclipse to properly launch the server itself. You may not need 7.0.12, but you will need to use the zip/tar.gz download.
Eclipse 无法使用已安装的副本,这听起来像是您所拥有的。已安装副本的库和配置文件通常以不可预测的方式分散,这使得 Eclipse 很难/不可能正确启动服务器本身。您可能不需要 7.0.12,但您需要使用 zip/tar.gz 下载。
回答by Bob Leurck
Following on the advice to add some symbolic links, I needed to due the following to match my synaptic tomcat7 /usr/share/tomcat7 to eclipse indigo's requirements.
按照添加一些符号链接的建议,我需要根据以下内容来匹配我的突触 tomcat7 /usr/share/tomcat7 来满足 eclipse indigo 的要求。
Install tomcat7 using synaptic. Add a tomcat7 server using the eclipse wizard (I let eclipse download it into /home/me/tomcat7 ). Compare the folder structure of /usr/share/tomcat7 and /home/me/tomcat7. Add any symbolic links from /var/lib/tomcat7 to /usr/share/tomcat7 to match /home/tomcat7 . Copy the 'missing' jars in /home/me/tomcat7/bin and /home/me/tomcat7/lib to their respective locations in /usr/share/tomcat7 .
使用突触安装 tomcat7。使用 eclipse 向导添加一个 tomcat7 服务器(我让 eclipse 将它下载到 /home/me/tomcat7 )。比较 /usr/share/tomcat7 和 /home/me/tomcat7 的文件夹结构。添加从 /var/lib/tomcat7 到 /usr/share/tomcat7 的任何符号链接以匹配 /home/tomcat7 。将 /home/me/tomcat7/bin 和 /home/me/tomcat7/lib 中的“丢失”jar 复制到 /usr/share/tomcat7 中的相应位置。
In short - let the wizard setup the server, then see what you can do to adulterate your synaptic configuration to match the eclipse needs ;-) Worked for me in Ubuntu 12.04 oracle java 1.7.
简而言之 - 让向导设置服务器,然后看看你可以做些什么来掺假你的突触配置以满足 eclipse 的需求;-) 在 Ubuntu 12.04 oracle java 1.7 中对我来说有效。