Eclipse3.1是最新版本,其适配的Lomboz3.1和JBoss4也都是最新的版本,关于以前版本的安装网站上有很多的介绍,昨天下午开始用最新的版本安装,今天上午安装成功,也走了一点弯路。现在贴出来,供大家参照。
1。获得相关资源;
Eclipse3.1.1可以从www.eclipse.com上获得,我下载的是eclipse-SDK-3.1.1-win32.zip,这个文件夹解压缩开来,基本上启动就可以用了,不过eclipse3.1.1的启动需要jdk 1.4以上的支持,如果没有安装jdk,请访问http://java.sun.com/下载jdk1.4版本以上,并确保其可用。(如果需要中文版的eclipse,可以下载NLpack1_FeatureOverlay-eclipse-SDK-3.1.1.zip和NLpack1-eclipse-SDK-3.1.1a-win32.zip,并解压缩开发,放到eclipse下相应目录,就可以看到中文界面的eclpse.具体的下载地址可以来源于www.eclipse.org ,也可以到google或者baidu里搜索下载。
Lomboz3.1可以从www.objectweb.org 上获得,请确保你的到的版本是lomboz-emf-gef-jem-3.1RC2.zip和lomboz-3.1RC2.zip。
JBoss4可以从www.jboss.com上获得,我下载的版本是jboss-4.0.4RC1.zip。在下载完JBoss后,必须确认JBoss能单独启动。另外,JBoss需要集成Apache Tomcat,请先下载Tomcat,地址是www.apache.org
我下载的是apache-tomcat-5.5.15.zip,并确保tomcat单独能启动。此外,你还可能需要一个eclipse里支持tomcat的插件,名称是tomcatPluginV31.zip,是对应eclipse3.1版本的。
2。安装插件;
首先把tomcatPluginV31解压缩开来的目录,拷贝到eclipse下plugins下目录,启动eclipse,打开windows->preference,如果看到左边列表里出现了Tomcat选项,就表示tomcat插件安装成功了。你可以进行适当配置,以适应启动。此外,Eclipse的菜单栏,也会出现tomcat的三个控制图标。
安装Lomboz插件,把下载的lomboz-emf-gef-jem-3.1RC2.zip和lomboz-3.1RC2.zip解压缩开来,并拷贝到eclipse的对应目录,重新启动eclipse,如果在windows->preference看到有Web Service选项,表明lomboz安装已经成功了。这个时候打开JSP页面,也能看到相应的解析了。
此外为了增加lomboz的项目控制插件,你还需要到www.objectweb.org 下载org.objectweb.lomboz_3.0.1.N20050106.zip和emf-sdo-runtime-2.0.1.zip,同样解开压缩到eclipse相关目录,注意不要覆盖已有的。这个样子,就能有如下选项。
还有,默认的jboss没有4.0.4的版本,不要紧,你可以自己建一个,到D:/javatool/eclipse3.1.1/plugins/com.objectlearn.jdt.j2ee_3.0.1/servers下拷贝一个jboss32x.server的,更名为jboss40x.server,内容设置如下,
<serverDefinition
name="JBOSS 4.0.4"
ejbModules="true"
webModules="true"
earModules="true">
<property id="serverRootDirectory"
label="Application Server Directory:"
type="directory"
default="D:/javatool/jboss-4.0.4RC1" />
<property id="serverAddress"
label="Address:"
type="string"
default="127.0.0.1" />
<property id="serverPort"
label="Port:"
type="string"
default="8085" />
<property id="serverConfig"
label="Server Configuration (minimal/default/all):"
type="string"
default="default" />
<property id="classPathVariableName"
label="Classpath Variable Name:"
type="string"
default="JBOSS402" />
<property id="classPath"
label="Classpath Variable:"
type="directory"
default="D:/javatool/jboss-4.0.4RC1" />
<property id="minimumHeapSize"
label="Minimun Heap Size:"
type="string"
default="92M" />
<property id="maximumHeapSize"
label="Maximum Heap Size:"
type="string"
default="256M" />
<serverHome>${serverRootDirectory}</serverHome>
<webModulesDeployDirectory>${serverRootDirectory}/server/${serverConfig}/deploy</webModulesDeployDirectory>
<ejbModulesDeployDirectory>${serverRootDirectory}/server/${serverConfig}/deploy</ejbModulesDeployDirectory>
<earModulesDeployDirectory>${serverRootDirectory}/server/${serverConfig}/deploy</earModulesDeployDirectory>
<jndiInitialContextFactory>org.jnp.interfaces.NamingContextFactory</jndiInitialContextFactory>
<jndiProviderUrl>jnp://${serverAddress}:1099</jndiProviderUrl>
<startClass>org.jboss.Main</startClass>
<startWorkingDirectory>${serverRootDirectory}/bin</startWorkingDirectory>
<startVmParameters> -Dprogram.name=run.bat -Djava.endorsed.dirs=${serverRootDirectory}/lib/endorsed -Xms${minimumHeapSize} -Xmx${maximumHeapSize}</startVmParameters>
<startProgramArguments>-c ${serverConfig}</startProgramArguments>
<stopClass>org.jboss.Shutdown</stopClass>
<stopWorkingDirectory>${serverRootDirectory}/bin</stopWorkingDirectory>
<stopVmParameters>-cp ${classPathVariableName}/bin/shutdown.jar -Djboss.boot.loader.name=shutdown.bat</stopVmParameters>
<stopProgramArguments>-S</stopProgramArguments>
<serverClassPath>
<jar type="variable">JDK_TOOLS</jar>
<jar type="variable">${classPathVariableName}/bin/run.jar</jar>
</serverClassPath>
<clientClassPath>
<jar type="variable">${classPathVariableName}/client/jboss-j2ee.jar</jar>
<jar type="variable">${classPathVariableName}/client/jnp-client.jar</jar>
<jar type="variable">${classPathVariableName}/client/jboss-client.jar</jar>
<jar type="variable">${classPathVariableName}/client/jboss-common-client.jar</jar>
<jar type="variable">${classPathVariableName}/client/jbosssx-client.jar</jar>
<jar type="variable">${classPathVariableName}/client/log4j.jar</jar>
<jar type="variable">${classPathVariableName}/client/jnet.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jnpserver.jar</jar>
<jar type="variable">${classPathVariableName}/client/jboss-jaas.jar</jar>
</clientClassPath>
<projectClassPath>
<jar type="variable">JDK_TOOLS</jar>
<jar type="variable">${classPathVariableName}/bin/run.jar</jar>
<jar type="variable">${classPathVariableName}/bin/shutdown.jar</jar>
<jar type="variable">${classPathVariableName}/client/jboss-j2ee.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/javax.servlet.jar</jar>
<jar type="variable">${classPathVariableName}/lib/jboss-system.jar</jar>
<jar type="variable">${classPathVariableName}/lib/concurrent.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jnpserver.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jpl-pattern.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jpl-util.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss-transaction.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/bcel.jar</jar>
</projectClassPath>
<adminTool>
<web><deploy /><undeploy />
</web>
<ejb><deploy /><undeploy />
</ejb>
<ear><deploy /><undeploy />
<webModule><deploy /><undeploy />
</webModule>
<ejbModule><deploy /><undeploy />
</ejbModule>
</ear>
</adminTool>
<adminToolPath>
</adminToolPath>
</serverDefinition>
这样上图的下拉菜单里就会出现JBOSS 4.0.4的选项,适应性修改适合本机就可以了。如图:
3。建立JBOSS项目工程
这样,安装基本成功了。