关于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) 阅读(12069)

Fedora下构建Android开发环境

2011年5月03日 23:40

下载,安装,配置Android SDK

1.首先去http://developer.android.com.nyud.net/index.html下载Android的SDK,不需翻墙。

2.针对自己的操作系统平台下载SDK,此处本人下载android-sdk_r10-linux_x86.tgz

  在指定的目录解压它。tar -xzvf android-sdk_r10-linux_x86.tgz

3.在解压后的目录中将会有tools目录,shell输入pwd获得当前目录路径,并将此路径加入配置文件中。

  可以是当前用户/home下的.bashrc或者.bash_profile。

4.另起一个shell,输入android(刚才tools目录下的可执行脚本)。如果有名称是Android SDK and AVD Manager的GUI出现,

  说明配置成功。

 

安装Android的Eclipse插件 ADT Plugin

5.下载安装Eclipse,本人使用Eclipse IDE for Java EE Developers版本。(JDK当作已经安装配置好了)

6.运行Eclipse,点击菜单 [Help] -> [Install New Software...]。

7.点击 [Add...],在Name处输入一个名字(Android Plugin),在Location处输入更新网址 https://dl-ssl.google.com/android/eclipse/。

8.等待更新加载完成,然后在复选框里选中[Developer Tools],点击 [Next] -> [Next] -> [Finish] 安装完成。(可能会出现一些错误,本人做法:直接删除,重新来过)

9.安装完毕后会提示重启Eclipse,OK就好了。之后Eclipse的工具栏中会出现Android的图标。

10.之后还需要一些配置。点击菜单 [Window] -> [Preferences...] 打开选项配置界面。

11.在左边选择 [Android] ,设置 [SDK Location] 为上述解压Android SDK的路径。点击 [Apply] -> [OK] ,配置完成。

 

添加Android Platform和其他组件

这些组件需要通过Android SDK来安装,启动Andoird SDK的方法:

    1)cd到Android SDK的解压路径,cd到tools目录。执行./android。之后会弹出Android SDK and AVD Manager界面。

    2)Eclipse中单击工具栏上的Android的小机器人图标,或者[Window] -> [Android SDK and AVD Manager]。

12.Android SDK and AVD Manager界面中,在[Available Packages] 标签里,选择你想要安装的组件,然后安装即可。

  本人直接在[Installed Packages]标签中,选择[Update All...],然后全选,之后Install。(犯傻了,装完相当大……)

 

创建AVD

13.在Android SDK and AVD Manager中的[Virtual devices]标签里,[New...],输入名字、选择Taget,分配SD卡大小。确定。

 

参考文献

http://www.icycandy.com/blog/android-2-3-development-environment-configuration

Tags: Android Eclipse fedora linux
评论(0) 阅读(6201)