ITPub博客

首页 > 应用开发 > Java > eclipse + jboss

eclipse + jboss

原创 Java 作者:dufusjw 时间:2006-04-14 22:45:08 0 删除 编辑
之前在网上看了很多关于这方面的文章,经过自己的一些测试,终于……,嘿,结果你也知道,OK了,开心地说,所以想给大家分享分享劳动果实!

其实我也跟大家一样,是一个喜欢追求时尚的爷们,所以当前配置是Eclipse3.1+JBoss4.0.0,说实在的,我对那些所谓的汉化版是较为鄙视的,学学E文也好嘛,不要老让老外们牵着鼻子,做什么事都迟他们一步,俺们能看懂E文,老外们看不懂中文(说实在的,中文比E文高级多了,所以也更难学),自然他们就会慢慢地跟着俺们的屁股追了,废话不多说,现在让我们切入正题吧!(有什么不懂的,记得给我回复哦)

这个配置要分四步走,具体如下:

首先,巧妇难为无米之炊,没有工具谈整合开发,可要比叫男人生小孩痛苦得多。所以,我们都下载相应工具。
Eclipse3.1下载:http://www.eclipse.org/downloads/index.php(若大的3.1,够醒目吧,哈!)
JBoss4.00下载:http://www.jboss.org/products/jbossas/downloads(哈,什么版本都有吧)
Lomboz下载:http://forge.objectweb.org/project/showfiles.php?group_id=97(很多版本,择优吧)
以上的三个网站,希望大家收藏起来,以后如果有新的版本,都可以在这上面看到,更新方便得多哦。

其次,将三个宝(压缩包)分别解压,eclipse-SDK-3.1-win32.zip解压至D:Eclipse3.1目录(别告诉我你没有D盘),jboss-4.0.0.zip 解压至D:jboss-4.0.0目录

再次,搭建Eclipse+Lomboz环境。
可能这个时候有朋友对Lomboz这东东还不太理解(俺当初就菜成这副模样,不骗你),其实呢,在百度(严重支持国货)里Search一下就知道了,它是一个通用插件,通过它,Eclipse可以整合各种服务器,不过这东东好像不太好配置,主要是因为版本问题,还好我运气没那么背,第一次就捡狗屎运的配置成功了(而且还在第二天找了个GF),这里有两个搭配(emf-sdo-runtime-I200412160800.zip+org.objectweb.lomboz_3.1.0.N20041219.zip 和 emf-sdo-runtime-I200503181320.rar+org.objectweb.lomboz_3.1.0.N20050106.zip),至于选择哪种就随你的便了,不过后一个版本要靠新一些(Why? Ask me? See the data!),然后给两个ZIP文件解压,将features目录下的所有内容拷贝到D:Eclipse3.1features目录,将plugins目录下的所有内容拷贝到D:Eclipse3.1plugins目录。(关键步骤到了)这时,进入D:Eclipse3.1configuration,删除org.eclipse.update文件夹(很多配置好的却没有显示都是没删这东东惹的祸),OK,启动Eclipse,选择菜单栏的Window,在下拉菜单中选择Preferences,弹出的Preferences属性框中,你看到了什么??是不是多了个Lomboz配置选项,对就这玩意,选择它,配置tool.jar的路径,我的配置是C:Javajdk1.5.0_04libtools.jar(偶的JDK1.5装在C:Javajdk1.5.0_04目录下),再展开Lomboz项,这时你会看到Server Definitions,这个才是真正配置启动服务器类型的选项(例如JBoss、Weblogic、Tomcat、Resin、Websphere),下面就专门来讲解这个配置。

Server Definitions配置详解: Server types:在下拉菜单中选择需要配置的服务器(有版本区别),在此我选择JBOSS 4.0.0
注:Server types下拉菜单默认最高支持到JBOSS 3.2.x,这方面的配置见附属说明。
Application Server Directory:D:/jboss-4.0.0(你的Jboss安装路径)
Classpath Variable:D:/jboss-4.0.0(你的Jboss安装路径)
其它项,全取默认值

如果你不幸是用Linux的朋友,哦,对不起,忘记事先说明了,偶用的是Windows(晕死)平台,兄弟们,这可是偶摸了一天两夜才难产出来的自创性文章,如果其中某环节出了什么差池,可别扁我哦!

附属说明:在D:Eclipse3.1pluginscom.objectlearn.jdt.j2ee_3.0.1servers目录下有一系列配置文件,你可以在此目录下新建一个jboss400.server的文件,用Editplus打开它编辑,文件内容如下:


name="JBOSS 4.0.0"
ejbModules="true"
webModules="true"
earModules="true">
label="Application Server Directory:"
type="directory"
default="D:/jboss-4.0.0" />
label="Address:"
type="string"
default="127.0.0.1" />
label="Port:"
type="string"
default="8080" />
label="Server Configuration (minimal/default/all):"
type="string"
default="default" />
label="Classpath Variable Name:"
type="string"
default="JBOSS400" />
label="Classpath Variable:"
type="directory"
default="D:/jboss-4.0.0" />
${serverRootDirectory}
${serverRootDirectory}/server/${serverConfig}/deploy
${serverRootDirectory}/server/${serverConfig}/deploy
${serverRootDirectory}/server/${serverConfig}/deploy
org.jnp.interfaces.NamingContextFactory
jnp://${serverAddress}:1099
org.jboss.Main
${serverRootDirectory}/bin

-c ${serverConfig}
org.jboss.Shutdown
${serverRootDirectory}/bin

-S

JDK_TOOLS
${classPathVariableName}/bin/run.jar
${classPathVariableName}/bin/shutdown.jar
${classPathVariableName}/client/jboss-j2ee.jar
${classPathVariableName}/server/${serverConfig}/lib/javax.servlet.jar
${classPathVariableName}/lib/jboss-boot.jar
${classPathVariableName}/lib/jboss-system.jar
${classPathVariableName}/lib/concurrent.jar
${classPathVariableName}/server/${serverConfig}/lib/jboss.jar
${classPathVariableName}/server/${serverConfig}/lib/jnpserver.jar
${classPathVariableName}/server/${serverConfig}/lib/jpl-pattern.jar
${classPathVariableName}/server/${serverConfig}/lib/jpl-util.jar
${classPathVariableName}/server/${serverConfig}/lib/jboss-transaction.jar
${classPathVariableName}/server/${serverConfig}/lib/bcel.jar
${classPathVariableName}/lib/jdom.jar
${classPathVariableName}/lib/xercesImpl.jar
${classPathVariableName}/lib/xml-apis.jar
${classPathVariableName}/lib/gnu-regexp.jar
${classPathVariableName}/lib/getopt.jar


${classPathVariableName}/client/jboss-j2ee.jar
${classPathVariableName}/client/jnp-client.jar
${classPathVariableName}/client/jboss-client.jar
${classPathVariableName}/client/jboss-common-client.jar
${classPathVariableName}/client/jbosssx-client.jar
${classPathVariableName}/client/log4j.jar
${classPathVariableName}/client/jnet.jar
${classPathVariableName}/server/default/lib/jnpserver.jar
${classPathVariableName}/client/jboss-jaas.jar


JDK_TOOLS
${classPathVariableName}/bin/run.jar
${classPathVariableName}/bin/shutdown.jar
${classPathVariableName}/client/jboss-j2ee.jar
${classPathVariableName}/server/${serverConfig}/lib/javax.servlet.jar
${classPathVariableName}/lib/jboss-boot.jar
${classPathVariableName}/lib/jboss-system.jar
${classPathVariableName}/lib/concurrent.jar
${classPathVariableName}/server/${serverConfig}/lib/jboss.jar
${classPathVariableName}/server/${serverConfig}/lib/jnpserver.jar
${classPathVariableName}/server/${serverConfig}/lib/jpl-pattern.jar
${classPathVariableName}/server/${serverConfig}/lib/jpl-util.jar
${classPathVariableName}/server/${serverConfig}/lib/jboss-transaction.jar
${classPathVariableName}/server/${serverConfig}/lib/bcel.jar















[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7183405/viewspace-827471/,如需转载,请注明出处,否则将追究法律责任。

上一篇: eclipse插件问题
请登录后发表评论 登录
全部评论
  • 博文量
    7
  • 访问量
    201769