這個文章是對《Eclipse快速上手EJB -- 1. Lomboz + JBoss-IDE 配置1 》一文的一點補充。在那篇文章中,jboss400.server這個配置是針對JBoss 4.0.0 的,如果使用的是JBoss 4.0.1,需要使用以下的配置文件:
jboss401.server
${serverRootDirectory}${serverRootDirectory}/server/${serverConfig}/deploy${serverRootDirectory}/server/${serverConfig}/deploy${serverRootDirectory}/server/${serverConfig}/deployorg.jnp.interfaces.NamingContextFactoryjnp://${serverAddress}:1099org.jboss.Main${serverRootDirectory}/bin-Dprogram.name=run.bat -DJava.endorsed.dirs=${serverRootDirectory}/bin/../lib/endorsed -Xms128m -Xmx512m-c ${serverConfig}org.jboss.Shutdown${serverRootDirectory}/bin-cp ${classPathVariableName}/bin/shutdown.jar -Djboss.boot.loader.name=shutdown.bat-SJDK_TOOLS${classPathVariableName}/bin/run.jar${classPathVariableName}/clIEnt/jboss-J2EE.jar${classPathVariableName}/client/jnp-clIEnt.jar${classPathVariableName}/client/jbossall-clIEnt.jar${classPathVariableName}/client/jboss-common-clIEnt.jar${classPathVariableName}/client/jbosssx-clIEnt.jar${classPathVariableName}/clIEnt/log4j.jar${classPathVariableName}/server/default/lib/jnpserver.jarJDK_TOOLS${classPathVariableName}/bin/run.jar${classPathVariableName}/bin/shutdown.jar${classPathVariableName}/clIEnt/jboss-J2EE.jar${classPathVariableName}/server/${serverConfig}/lib/Javax.servlet.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
需要根據自己的JBoss 4.0.1的安裝路徑改動文件中的加粗斜體的部分,也可以在Eclipse中的Lomboz配置中改動。在JBoss 4.0.1及JBoss 4.0.1SP1中測試成功。