2007-03-26

丢弃MyEclipse

由于myEclipse集成了很多有用的插件,使很多java开发者喜欢使用。但使用久了,就发现其太消耗资源。
这里提供几个办法,解决对一些不使用myelipse但能实现其同样功能的办法:
代替,web发布的以及调试的功能。
1。使用 Jetty JettyLaunche,这个插件很常用。
简单配置见下图:

局限性:需要使用jetty

2。使用jetty.xml,以下以jetty6为例:


用到的jetty.xml 配置可以放置到任何位置。我这里在项目的 src/test/resources/jetty6中,jetty.xml 同时需要一realm.properties文件,内容如下:

java 代码
 
  1. #  
  2. # This file defines users passwords and roles for a HashUserRealm  
  3. #  
  4. # The format is  
  5. #  : [, ...]  
  6. #  
  7. # Passwords may be clear text, obfuscated or checksummed.  The class  
  8. # org.mortbay.util.Password should be used to generate obfuscated  
  9. # passwords or password checksums  
  10. #  
  11. # If DIGEST Authentication is used, the password must be in a recoverable  
  12. # format, either plain text or OBF:.  
  13. #  
  14. jetty: MD5:164c88b302622e17050af52c89945d44,user  
  15. admin: CRYPT:ad1ks..kc.1Ug,server-administrator,content-administrator,admin  
  16. other: OBF:1xmk1w261u9r1w1c1xmq  
  17. plain: plain  
  18. user: password  
  19.   
  20. # This entry is for digest auth.  The credential is a MD5 hash of username:realmname:password  
  21. digest: MD5:6e120743ad67abfbc385bc2bb754e297  

jetty.xml的内容如下,请根据自己项目的情况做修改:
xml 代码
 
  1. xml version="1.0"?>  
  2.   "-//Mort Bay Consulting//DTD Configure//EN"  
  3.   "http://jetty.mortbay.org/configure_1_2.dtd">  
  4. <Configure class="org.mortbay.jetty.Server">  
  5.   
  6.     <Set name="ThreadPool">  
  7.         <New class="org.mortbay.thread.BoundedThreadPool">  
  8.             <Set name="minThreads">10Set>  
  9.             <Set name="lowThreads">25Set>  
  10.             <Set name="maxThreads">250Set>  
  11.         New>  
  12.     Set>  
  13.   
  14.     <Set name="connectors">  
  15.         <Array type="org.mortbay.jetty.Connector">  
  16.             <Item>  
  17.                 <New class="org.mortbay.jetty.bio.SocketConnector">  
  18.                     <Set name="port">8080Set>  
  19.                     <Set name="maxIdleTime">50000Set>  
  20.                 New>  
  21.             Item>  
  22.         Array>  
  23.     Set>  
  24.   
  25.     <Set name="handlers">  
  26.         <Array type="org.mortbay.jetty.Handler">  
  27.             <Item>  
  28.                 <New class="org.mortbay.jetty.webapp.WebAppContext">  
  29.                     <Set name="contextPath">/Set>  
  30.                     <Set name="war">src/main/webappSet>  
  31.                     <Get name="SessionHandler">  
  32.                         <Set name="SessionManager">  
  33.                             <New  
  34.                                 class="org.mortbay.jetty.servlet.HashSessionManager" />  
  35.                         Set>  
  36.                     Get>  
  37.                 New>  
  38.             Item>  
  39.         Array>  
  40.     Set>  
  41.   
  42.       
  43.       
  44.       
  45.     <Set name="UserRealms">  
  46.         <Array type="org.mortbay.jetty.security.UserRealm">  
  47.             <Item>  
  48.                 <New class="org.mortbay.jetty.security.HashUserRealm">  
  49.                     <Set name="name">Test RealmSet>  
  50.                     <Set name="config">src/test/resources/jetty6/realm.propertiesSet>  
  51.                 New>  
  52.             Item>  
  53.         Array>  
  54.     Set>  
  55.   
  56.     <Set name="stopAtShutdown">trueSet>  
  57.       
  58.     <Set name="sendServerVersion">trueSet>  
  59. Configure>  
同时需要把jetty6种的一些jar包加入项目中,jar包如下图:


我喜欢第二种方法。但也是局限在jetty下,不过在开发过程中,使用jetty还是不错的。


可以使用Aptana Web Development 代替myeclipse 中的 js css,html等编辑器。
评论
zhangzhaofeng 2007-03-27
我自己装了myeclipse自己看着舒服 开发 只用eclispe
chibi 2007-03-27
我使用hibernate tools来代替myeclipse hibernate部分,但有个问题一直没法解决,我写好hbm以后无法一起生成public class和abstract class
cozone_柯中 2007-03-27
giscat 写道
yiding_he 写道
主要是编辑 JSP 的功能太烂。连 NB 都比它好。


jcreator写jsp不错的


这东西的速度也快不到那里去吧? 功能太单一
jfy3d 2007-03-27
用MyEclipse的话就不如用Intelij idea了
ahuaxuan 2007-03-27
lococode 写道
,干净的,eclipse基本上够使用了.最多, 加一个 svn的plugins 91
我记得干净的eclipse好像不支持jsp吧,而myeciplse支持的,但是myecilpse还有生成hbm和po的功能,这一点还是挺好的,觉得要比middlegen好,middlegen一生成就是所有表,而myeciplse可以选择表生成hbm和po,当然如果你不用hibernate,那它这个优点就无足轻重了
差沙 2007-03-27
lococode 写道
,干净的,eclipse基本上够使用了.最多, 加一个 svn的plugins 91


再加一个xml的插件,足矣
giscat 2007-03-27
lococode 写道
,干净的,eclipse基本上够使用了.最多, 加一个 svn的plugins 91

直接用CVS就啥都不需要了
giscat 2007-03-27
yiding_he 写道
主要是编辑 JSP 的功能太烂。连 NB 都比它好。


jcreator写jsp不错的
cozone_柯中 2007-03-27
iyuohz 写道
MyEclipse 5.5 有spring2.0了
不过 离正式版出还有段日子


越强大,越慢
lococode 2007-03-26
,干净的,eclipse基本上够使用了.最多, 加一个 svn的plugins 91
阳光晒晒 2007-03-26
MyEclipse太慢了
不过楼下你们都安什么插件了?
我用的wsad没什么几会去学习插件
iyuohz 2007-03-26
MyEclipse 5.5 有spring2.0了
不过 离正式版出还有段日子
zhlmmc 2007-03-26
Eclipse的WTP已经足够了,MyEclipse经常导致Eclipse死掉
yiding_he 2007-03-26
主要是编辑 JSP 的功能太烂。连 NB 都比它好。
生命火花 2007-03-26
关键是MyEclipse的版本是在太旧了!跟不上开发进度!

1: CDT 和 MyEclispe冲突
2: webservices用的还是xfire1.1
3: myEclipse的format功能和replace功能不稳定
4: uml工具慢的要死!而且不能上一步 下一步
5: hibernate的Annotation包都步齐,还有我自己配
6: ejb3.0的包也没有
7: spring 也才1.x的
giscat 2007-03-26
插件越来越混乱了
其实eclipse不使用任何插件就能好好干活了
lococode
搜索本博客
存档
最新评论