一、前提条件

1.1确保你安装了Eclipse或者MyEclipse,如果安装的是Eclipse是否安装了JDK.

1.2确保你下载了Tomcat,到这里选择合适的版本下载。

二、下载安装Tomatplugin

我下载的是TomatpluginV 3.2,请到这里下载。

将Tomatpluginv解压缩之后放到Eclipse的plugins目录,MyEclipse是里面的个Eclipse/Plugins目录。

三、设置TomcatPlugin

重启Eclipse和MyEclipse,可以看见3只小猫,如下图,分别代表运行Tomcat、关闭Tomcat、重启Tomcat。

tomcatplugin

3.2在Window—->preference会看到Tomcat属性设置页,选择你的Tomcat版本,选择你的Tomcat存放目录,其中sever.xml就会自动获取,可以不管。确定就ok了。如下图:

Tomcatplugin

在Eclipse中写入中文时就可能就出现这个。

some characters cannot be mapped using “iso-8859” character encoding

或者是

some characters cannot be mapped using gb2312 character encoding

之类的。

意识是文件编码不对,需要改正文件编码。

在Myeclipsce—-windows—-preferences—general—content types—点击text

找到jsp,在最下面修改为utf-8格式即可。其他文件修改方法类似。

eclipse导入JAR包,出现下面的错误:

an internal error occurred during:”Requesting java ASTfrom selection”

An internal error occurred during: “Requesting Java AST from selection”.

jzentry == 0,

jzfile = 109280664,

total = 1215,

name = E:\work\……

原因可能有如下几个

1、别的工程错误配置对其影响,具体参考name里面是那个jar包找到此工程。

2、name里面的jar包损坏,尝试重新换个。

3、

在启动eclipse时是否使用了如

-XX:MaxPermSize=128m -vmargs

-Xms256m

-Xmx512m

一样参数,如使用,请去掉。

如果还不能解决,Hector也不知道了,小菜飘过。

今天在Eclipse中编写用java套接字编写邮件客户端代码时,用到了BASE64Decoder,import sun.misc.BASE64Decoder;可是Eclipse提示:
Access restriction : The type BASE64Decoder is not accessible due to restriction on required library C:\Program
files\java\jre6\lib\rt.jar
Access restriction : The constructor BASE64Decoder() is not accessible due to restriction on required library C:\Program files\java\jre6\lib\rt.jar
解决方法也很是怪异,要在project build path中先移除JRE System Library,再添加库JRE System Library,之后就可以了。

可能是eclipse考虑某些原因初始没有引进这个包,添加了相应的代码之后重新引进Library又引入了,怪异~~