Eclipse3.0下配置JBoss3.2.5(与其它的有点不同)

类别:Java 点击:0 评论:0 推荐:
以下是网上的:
1、已经安装了lomboz3.0.1插件
2、在插件目录:eclipse\plugins\com.objectlearn.jdt.j2ee_3.0.1\servers
需要添加一个文件jboss325.server,内容为:

<serverDefinition
name="JBOSS 3.2.5"
ejbModules="true"
webModules="true"
earModules="true">
<property id="serverRootDirectory"
label="Application Server Directory:"
type="directory"
default="F:/jboss-3.2.5" />
<property id="serverAddress"
label="Address:"
type="string"
default="127.0.0.1" />
<property id="serverPort"
label="Port:"
type="string"
default="8080" />
<property id="serverConfig"
label="Server Configuration (minimal/default/all):"
type="string"
default="default" />
<property id="classPathVariableName"
label="Classpath Variable Name:"
type="string"
default="JBOSS325" />
<property id="classPath"
label="Classpath Variable:"
type="directory"
default="F:/jboss-3.2.5" />
<serverHome>$</serverHome>
<webModulesDeployDirectory>$/server/$/deploy</webModulesDeployDirectory>
<ejbModulesDeployDirectory>$/server/$/deploy</ejbModulesDeployDirectory>
<earModulesDeployDirectory>$/server/$/deploy</earModulesDeployDirectory>
<jndiInitialContextFactory>org.jnp.interfaces.NamingContextFactory</jndiInitialContextFactory>
<jndiProviderUrl>jnp://$:1099</jndiProviderUrl>
<startClass>org.jboss.Main</startClass>
<startWorkingDirectory>$/bin</startWorkingDirectory>
<startVmParameters></startVmParameters>
<startProgramArguments>-c $</startProgramArguments>
<stopClass>org.jboss.Shutdown</stopClass>
<stopWorkingDirectory>$/bin</stopWorkingDirectory>
<stopVmParameters></stopVmParameters>
<stopProgramArguments>-S</stopProgramArguments>
<serverClassPath>
<jar type="variable">JDK_TOOLS</jar>
<jar type="variable">$/bin/run.jar</jar>
<jar type="variable">$/bin/shutdown.jar</jar>
<jar type="variable">$/client/jboss-j2ee.jar</jar>
<jar type="variable">$/lib/concurrent.jar</jar>
<jar type="variable">$/lib/jboss-system.jar</jar>
<jar type="variable">$/lib/dom4j.jar</jar>
<jar type="variable">$/lib/xercesImpl.jar</jar>
<jar type="variable">$/lib/xml-apis.jar</jar>
<jar type="variable">$/lib/gnu-regexp.jar</jar>
<jar type="variable">$/lib/getopt.jar</jar>
<jar type="variable">$/server/$/deploy/jbossweb-tomcat50.sar/servlet-api.jar</jar>
<jar type="variable">$/server/$/lib/bcel.jar</jar>
<jar type="variable">$/server/$/lib/jboss.jar</jar>
<jar type="variable">$/server/$/lib/jboss-transaction.jar</jar>
<jar type="variable">$/server/$/lib/jnpserver.jar</jar>
<jar type="variable">$/server/$/lib/jpl-pattern.jar</jar>
<jar type="variable">$/server/$/lib/jpl-util.jar</jar>
</serverClassPath>
<clientClassPath>
<jar type="variable">$/client/jboss-j2ee.jar</jar>
<jar type="variable">$/client/jboss-client.jar</jar>
<jar type="variable">$/client/jboss-common-client.jar</jar>
<jar type="variable">$/client/jboss-jaas.jar</jar>
<jar type="variable">$/client/jbosssx-client.jar</jar>
<jar type="variable">$/client/jnet.jar</jar>
<jar type="variable">$/client/jnp-client.jar</jar>
<jar type="variable">$/client/log4j.jar</jar>
<jar type="variable">$/server/default/lib/jnpserver.jar</jar>
</clientClassPath>
<projectClassPath>
<jar type="variable">JDK_TOOLS</jar>
<jar type="variable">$/bin/run.jar</jar>
<jar type="variable">$/bin/shutdown.jar</jar>
<jar type="variable">$/client/jboss-j2ee.jar</jar>
<jar type="variable">$/lib/concurrent.jar</jar>
<jar type="variable">$/lib/jboss-system.jar</jar>
<jar type="variable">$/server/$/deploy/jbossweb-tomcat50.sar/servlet-api.jar</jar>
<jar type="variable">$/server/$/lib/bcel.jar</jar>
<jar type="variable">$/server/$/lib/jboss.jar</jar>
<jar type="variable">$/server/$/lib/jboss-transaction.jar</jar>
<jar type="variable">$/server/$/lib/jnpserver.jar</jar>
<jar type="variable">$/server/$/lib/jpl-pattern.jar</jar>
<jar type="variable">$/server/$/lib/jpl-util.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>

3Eclipse下使用菜单:Window->Preferences。
2.1、增加一个Classpath Variables,方法是Java->Build Path->Classpath Variables。增加一个JDK_TOOLS变量,目录指向%java_home%//lib/tools.jar

2.2、设置SERVER。方法是Lomboz->Server Definitions,将右边的Server types选中JOBSS 3.2.5。选择正确的Application Server Directory和Classpath Variable为JBoss的安装目录


而我的配置为:
只改动
<serverClassPath>
<jar type="variable">JDK_TOOLS</jar>
<jar type="variable">$/bin/run.jar</jar>
<jar type="variable">$/bin/shutdown.jar</jar>
<jar type="variable">$/client/jboss-j2ee.jar</jar>
<jar type="variable">$/lib/concurrent.jar</jar>
<jar type="variable">$/lib/jboss-system.jar</jar>
<jar type="variable">$/lib/dom4j.jar</jar>
<jar type="variable">$/lib/xercesImpl.jar</jar>
<jar type="variable">$/lib/xml-apis.jar</jar>
<jar type="variable">$/lib/gnu-regexp.jar</jar>
<jar type="variable">$/lib/getopt.jar</jar>
<jar type="variable">$/server/$/deploy/jbossweb-tomcat50.sar/servlet-api.jar</jar>
<jar type="variable">$/server/$/lib/bcel.jar</jar>
<jar type="variable">$/server/$/lib/jboss.jar</jar>
<jar type="variable">$/server/$/lib/jboss-transaction.jar</jar>
<jar type="variable">$/server/$/lib/jnpserver.jar</jar>
<jar type="variable">$/server/$/lib/jpl-pattern.jar</jar>
<jar type="variable">$/server/$/lib/jpl-util.jar</jar>
</serverClassPath>
<clientClassPath>
<jar type="variable">$/client/jboss-j2ee.jar</jar>
<jar type="variable">$/client/jboss-client.jar</jar>
<jar type="variable">$/client/jboss-common-client.jar</jar>
<jar type="variable">$/client/jboss-jaas.jar</jar>
<jar type="variable">$/client/jbosssx-client.jar</jar>
<jar type="variable">$/client/jnet.jar</jar>
<jar type="variable">$/client/jnp-client.jar</jar>
<jar type="variable">$/client/log4j.jar</jar>
<jar type="variable">$/server/default/lib/jnpserver.jar</jar>
</clientClassPath>
<projectClassPath>
<jar type="variable">JDK_TOOLS</jar>
<jar type="variable">$/bin/run.jar</jar>
<jar type="variable">$/bin/shutdown.jar</jar>
<jar type="variable">$/client/jboss-j2ee.jar</jar>
<jar type="variable">$/lib/concurrent.jar</jar>
<jar type="variable">$/lib/jboss-system.jar</jar>
<jar type="variable">$/server/$/deploy/jbossweb-tomcat50.sar/servlet-api.jar</jar>
<jar type="variable">$/server/$/lib/bcel.jar</jar>
<jar type="variable">$/server/$/lib/jboss.jar</jar>
<jar type="variable">$/server/$/lib/jboss-transaction.jar</jar>
<jar type="variable">$/server/$/lib/jnpserver.jar</jar>
<jar type="variable">$/server/$/lib/jpl-pattern.jar</jar>
<jar type="variable">$/server/$/lib/jpl-util.jar</jar>
</projectClassPath>
这样就可行

还有你的window->references->java->build path->classpath variables
要有一个变量叫JBOSS325,如果原来有JBOSS32X是不行的.把它删了或改动都可以.

本文地址:http://com.8s8s.com/it/it12711.htm