Payara Micro JAR folder structure

created onJanuary 28, 2022

overview of the structure of a Payara Micro JAR file

payara-micro.jar ├── fish │ └── payara/micro/ ├── META-INF │ ├── MANIFEST.MF │ └── maven/fish.payara.micro/payara-micro-boot/pom.xml └── MICRO-INF ├── classes ├── deploy ├── domain ├── lib ├── payara-boot.properties ├── post-boot-commands.txt ├── pre-boot-commands.txt └── runtime

JAR structure description

file description
fish/payara Payara Micro’s class files.
META-INF Contains the Manifest and POM files.
MICRO-INF/classes Contains classes which are added to the class path before those in the /runtime folder.
MICRO-INF/deploy Contains WAR, EAR, and EJB-JAR files for deployment.
MICRO-INF/domain Contains the domain.xml, default-web.xml, keystores, login.conf, logging.properties files, and other files that are written to the temporary file directory.
MICRO-INF/lib Contains additional third party dependency jars which will be automatically added to the instance’s classpath.
MICRO-INF/runtime Contains the core runtime jars.
MICRO-INF/payara-boot.properties The System properties file containing Payara Micro runtime flags. This will override runtime flags and can be overridden by command-line arguments.
MICRO-INF/.txt .txt files containing asadmin commands to execute post boot can also be stored within MICRO-INF. This includes pre-boot-commands, post-boot-commands, and post-deploy-commands.

runnnign nested JARs

Payara Micro has two options for unpacking classes:

unpacking to file system with unpack

By default, Payara Micro will unpack the nested JARs into a temporary directory within the directory specified by either the system property or the command line argument , and then load them as classes.

unpacking to memory nested

The argument will load the classes directly from the nested JARs to the memory without unpacking the JARs into a folder, but may slow the booting process.

To start Payara Micro as a nested JAR, use the option:

java -jar payara-micro.jar --nested