[英]Eclipse not recognizing Apache Tomcat on Debian/Linux
I am trying to get an eclipse project to recognize the apache/tomcat(v8.0..) that I have installed, but I am having trouble. 我正在尝试获取一个蚀项目来识别我已安装的apache / tomcat(v8.0 ..),但是遇到了麻烦。 The installation is from
sudo apt-get install tomcat8
, which after a lot of errors I have finally managed to solve. 安装来自
sudo apt-get install tomcat8
,经过很多错误,我终于设法解决了。 Now I am getting the following after I hook up the tomcat install at /usr/share/tomcat8
to a new project in eclipse. 在将
/usr/share/tomcat8
上的tomcat安装/usr/share/tomcat8
到eclipse中的新项目之后,现在我得到以下内容。
Description Resource Path Location Type
The container 'Apache Tomcat v8.0 [Apache Tomcat v8.0]' references non existing library '/usr/share/tomcat8/lib/commons-dbcp.jar' helloworld2 Build path Build Path Problem
I'm not sure what the problem could be. 我不确定是什么问题。 There should be no unreferenced libraries as I have installed everything from sudo.
应该没有未引用的库,因为我已经安装了sudo中的所有内容。 I DID have to use this
ln -s conf /usr/share/tomcat8/conf
to get Eclipse to hook up the library in the first place (as suggested here: Unknown version of Tomcat was specified 8.0.24 / Eclipse 4.4.2 (Luna) ). 我必须使用
ln -s conf /usr/share/tomcat8/conf
来使Eclipse首先连接该库(如此处所示: 未知版本的Tomcat被指定为8.0.24 / Eclipse 4.4.2(露娜) )。 So perhaps that broke it. 因此,也许这打破了它。 The road to hello world continues.....
通往世界的道路继续.....
EDIT: 编辑:
I tried the following: 我尝试了以下方法:
patientplatypus@next /usr/share/tomcat8/lib $ sudo chmod u+x commons-dbcp.jar
chmod: cannot operate on dangling symlink 'commons-dbcp.jar'
So this appears to be another tomcat8 issue. 因此,这似乎是另一个tomcat8问题。 On installation tomcat8 somehow makes a directory with dangling symlinks to important files.
在安装tomcat8时,将以某种方式使目录带有指向重要文件的悬挂链接。 Why it does this or what the fix is, I do not know.
我不知道为什么这样做或解决了什么。
I've not much linux experience, but I use tomcat and eclipse. 我没有太多的Linux经验,但是我使用了tomcat和eclipse。 Eclipse is a mix of java and platform specific binaries, but tomcat is java only (apart from tomcat native which is optional).
Eclipse是Java和特定于平台的二进制文件的混合,但是tomcat仅是Java(除了tomcat native外,它是可选的)。
If your eclipse supports tomcat8 (I don't remember which version luna supports), you do not need (or even desire) a full server install of tomcat8, you just need to have tomcat package unzipped in any directory you choose, and just point to it. 如果您的eclipse支持tomcat8(我不记得luna支持哪个版本),则您不需要(甚至不需要)完整的tomcat8服务器安装,您只需要在您选择的任何目录中解压缩tomcat程序包,然后指向对此。
Which is not the same as installing tomcat8 on your machine and then trying to make it work with eclipse. 这与在计算机上安装tomcat8,然后尝试使其在eclipse上运行不同。
My advice is: 我的建议是:
Once you have a war to deploy, you can install tomcat8 on a machine and put your war there and use it. 一旦部署了战争,就可以在计算机上安装tomcat8并将战争放置在那里并使用它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.