As the accepted answer did not help me in another, and a little easier. You still rely on custom domain.xml , but the start command can be simplified:
java -jar /opt/payara/payara-micro.jar --deploy webapp.war --domainConfig domain.xml --addJars /opt/mysql-connector-java-5.1.40-bin.jar
This call does not require you to know the main class.
thomas.mc.work
source share