Wildfly 21 - 运行 应用客户端

Wildfly 21 - run application client

我之前使用的是 JBoss EAP 5 并使用以下命令行运行应用程序客户端:

export RUNCLIENT_CLASSPATH="$RUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jbossall-client.jar:$JBOSS_HOME/client/jboss-metadata.jar:$JBOSS_HOME/lib/jboss-classloader.jar:$JBOSS_HOME/lib/jboss-classloading-spi.jar:$JBOSS_HOME/lib/jboss-classloading-vfs.jar:$JBOSS_HOME/lib/jboss-classloading.jar:$JBOSS_HOME/lib/jboss-dependency.jar:$JBOSS_HOME/lib/jboss-reflect.jar:$JBOSS_HOME/lib/jboss-kernel.jar:$JBOSS_HOME/lib/jboss-xml-binding.jar:$JBOSS_HOME/lib/jboss-vfs.jar:$JBOSS_HOME/common/lib/jboss-ejb3-core.jar:$JBOSS_HOME/common/lib/antlr.jar:$JBOSS_HOME/common/lib/commons-collections.jar:$JBOSS_HOME/common/lib/commons-logging.jar:$JBOSS_HOME/common/lib/hibernate-core.jar:$JBOSS_HOME/common/lib/quartz.jar:$JBOSS_HOME/server/default/lib/postgresql-8.4-701.jdbc3.jar:$JBOSS_HOME/lib/dom4j.jar:$JBOSS_HOME/server/default/lib/jaxrpc.jar:$JBOSS_HOME/server/default/lib/saaj.jar:$JBOSS_HOME/server/default/lib/commons-discovery-0.2.jar:$JBOSS_HOME/server/default/lib/axis.jar:$JBOSS_HOME/server/default/lib/wsdl4j.jar:$JBOSS_HOME/client/activation.jar:$JBOSS_HOME/client/mail.jar:$JBOSS_HOME/server/default/lib/mysql-connector-java-5.1.10-bin.jar:$JBOSS_HOME/common/lib/c3p0-0.9.1.2.jar:$JBOSS_HOME/common/lib/poi.jar"

$JAVA_HOME/bin/java -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -Xmx1024m -classpath $RUNCLIENT_CLASSPATH org.jboss.client.AppClientMain -jbossclient Main batch MYBEAUTIFULBATCH -launchers org.jboss.ejb3.client.ClientLauncher -j2ee.clientName MYPROJECT_BATCH

我已经升级到 wildfly 21,但我找不到如何做同样的事情?

我尝试了以下方法:

C:/WildFly/wildfly-21.0.2.Final/bin/appclient.sh C:/WildFly/wildfly-21.0.2.Final/standalone/deployments/MYPROJECT.ear#MYPROJECT_BATCH-1.0.jar batch MYBEAUTIFULBATCH

但我收到错误消息:

Error: Could not find or load main class org.jboss.modules.Main

我如何在 Wildfly 上做我在 JBoss 5 上所做的事情?

糟糕,我在 windows,我必须使用 .bat 而不是 .sh

像这样:

C:/WildFly/wildfly-21.0.2.Final/bin/appclient.bat C:/WildFly/wildfly-21.0.2.Final/standalone/deployments/MYPROJECT.ear#MYPROJECT_BATCH-1.0.jar batch MYBEAUTIFULBATCH