关于Eclipse配置Tomcat7时的错误Cannot create a server using the selected type

2012年2月25日 06:07

配Java EE环境的时候,使用Eclipse,Tomcat7。

Window–>Preferences–>Server–>Runtime Environments 里添加了自己本地/opt安装了的Tomcat7.

然后在Servers标签页添加本地的server时

就会报出 Cannot create a server using the selected type的错误。

从Runtime Environments里重新配置完全毫无效果,Google一下,

得到如下解决方案,尝试之后顺利解决此问题,在此mark一下,以防以后再碰到。

Some times if we delete the servers configuration in the workspace or if we move the workspace adding tomcat as server can become difficult thing.  We will hit with the error Cannot create a server using the selected type.

To resolve this error, try one or all of the following:

1.  Go to Window–>Preferences–>Server–>Runtime Environments and fix the broken path/link for the server

2.  Rename the org.eclipse.jst.server.tomcat.core.prefs to org.eclipse.jst.server.tomcat.core.prefs.bak (or you can delete this file). This file can be found at \workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings

3.  Rename the org.eclipse.wst.server.core.prefs to org.eclipse.wst.server.core.prefs.bak (or delete the file).  This file also can be found at the same location as above

原文链接:http://hariprasad.info/cannot-create-a-server-using-the-selected-type-eclipse-tomcat/

 

但是悲摧的是,当添加WEB项目到本地服务器的时候又出现如下问题~慢慢解决~~

 

问题还真多~干脆把workspace文件夹全部删掉,重新配置。

这次直接用Servers标签页下的向导配置,不是使用Window–>Preferences–>Server–>Runtime Environments

一路点了 next之后,又出现了

!!!!!!!!!!!!!

点开details才发现

好吧~我直接将eclipse放在/opt下了~backtrack用多了~root权限的特权被我忽略了

好吧

直接在/opt/apache-tomcat-7.0.26/conf下

chmod a+r *.*得了,省的麻烦。

这次OK了~

 

Thanks

Tags: Eclipse Cannot create a server using t Tomcat7
评论(12) 阅读(12030)

修改/更新 Linux下原有的JDK/JRE

2012年2月25日 04:24

从官网下载的JDK是1.7x的。不过我的fedora15里默认安装的JRE是1.6x。结果导致使用JDK1.7x编译的class文件在JRE1.6x上无法解释。具体原因没有去考证。所以简单的解决这个问题,将JRE也更新到JRE1.7x。

其实JDK中也包含解释环境,所以没有必要再下载一个JRE,直接用JDK自带得java解释器就好。

于是乎,改/etc/profile啊之类的,加JAVA_HOME等都没有解决问题~

得,来个狠的。直接用自己安转的代替原有的。

 

# cd /usr/bin
# ln -s -f   /opt/jdk1.7.0_03/bin/java
# ln -s -f  /opt/jdk1.7.0_03/bin/javac

 

java -version确认一下~OK

 

技术还真是不碰就忘得一干二净……

Tags: java jre linux jdk
评论(5) 阅读(4538)