starting Payara Micro

created onNovember 21, 2025

starting Payara Micro from the command line

Here are the command line parameters that I use most often when starting Payara Micro:

  • – file-path path can be a path to a war file containing the app to start Payara Micro with, or the path to an exploded war, i.e. the directory of a Java project.
  • – Payara only supports SSL-certs with a password.
  • – file-path can be a path to a single li (JAR-file), or to a directory containing the libs. Multiple entries can be specified ,seprarting them with a colon .

using a shell script to start Payara Micro

Documents the parameters for starting payara, saves from memorizing the parameters and saves a lot of typing. Example:

#!/bin/bash java -jar /opt/devel/srv/payara-micro/payara-micro-6.2023.9.jar \ --deploy target/jakartaee-10-qs \ --port 9023 \ --nocluster \ --contextroot /

troubleshooting

Java modules access

If Java modules are not used in the app, Payara might throw an InaccessibleObjectException, indicating the module that can’t be accessed from the app.

[2023-10-09T13:45:20.135+0100] [] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1696855520135] [levelValue: 1000] [[ Exception while loading the app java.lang.reflect.InaccessibleObjectException: Unable to make private static java.lang.ClassLoader java.io.ObjectInputStream.latestUserDefinedLoader() accessible: module java.base does not "opens java.io" to unnamed module @63d4e2ba at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) ...

The solution is to open the module that caused the error to all unnamed modules by adding , i.e. for the exception above by adding to the command line to start Payara Micro

–add-opens must be given before the option on the command line, otherwise it is interpreted as an option to run the JAR file with.

x