程序人生

撰写生活代码,等待编译美好人生
随笔 - 48, 文章 - 0, 评论 - 29, 引用 - 0
数据加载中……

Linux下Eclipse不认识Tomcat

刚配置完Tomcat,想在Eclipse下试一试,随便些了个HelloWorld,然后Run on Server。Eclipse之前没有建过Sever的,于是提示要创建一个Server,但是没想到给了我个错误提示:
Could not load the Tomcat server configuration at /opt/tomcat/conf. The configuration may be corrupt or incomplete.
本以为是环境变量配置错误。检查了一下,没有问题,而且Eclipse以外,直接运行服务器也正常。
折腾了半天,看了下
cyril@405Studio:/opt$ sudo ls -l tomcat
total 
68
drwxr
--r-- 2 root root  4096 2006-07-23 17:39 bin
drwxr
--r-- 6 root root  4096 2006-04-15 02:09 common
drwxr
--r-- 3 root root  4096 2006-07-23 19:41 conf
-rwxr--r-- 1 root root 11357 2006-04-15 02:11 LICENSE
drwxr
--r-- 2 root root  4096 2006-07-23 18:20 logs
-rwxr--r-- 1 root root   688 2006-04-15 02:11 NOTICE
-rwxr--r-- 1 root root  6384 2006-04-15 02:09 RELEASE-NOTES
-rwxr--r-- 1 root root  6964 2006-04-15 02:11 RUNNING.txt
drwxr
--r-- 5 root root  4096 2006-04-15 02:09 server
drwxr
--r-- 4 root root  4096 2006-04-15 02:09 shared
drwxr
--r-- 2 root root  4096 2006-07-23 17:39 temp
drwxr
--r-- 8 root root  4096 2006-04-15 02:09 webapps
drwxr
--r-- 3 root root  4096 2006-07-23 18:20 work

看样子可能是权限的问题。
于是
sudo chmod -R 777 /opt/tomcat/
再次启动Eclipse创建服务器完成!
总结:
Eclipse使用Tomcat作为服务器来开发的时候,需要对tomcat安装目录的文件进行读写操作,所以应该赋予Eclipse对tomcat安装目录的读写权限。



posted on 2006-07-23 20:04 405 Studio 阅读(1560) 评论(0)  编辑  收藏 所属分类: J2EELINUX


只有注册用户登录后才能发表评论。


网站导航: