4 minutes
Level Up Your Jakarta EE Apps with Payara 7 and New Docker Images
We’re excited to share major updates around the Docker image story for the Payara Platform Community, aligned with our […]
JBang is a tool that lets you run Java code with zero build setup. It handles dependencies, compilation, and execution with a single command – making Java as easy to run as a script. With JBang, you can:
For us Jakarta EE developers, JBang eliminates many of the configuration steps that typically slow down development. This post explores how to use a pre-configured JBang catalog with Payara tools hosted at https://github.com/pedanticdev/jbang-catalog to streamline your Jakarta EE development.
Traditional Jakarta EE development often involves:
JBang simplifies this process by letting you focus on your code rather than build configuration. For Payara Micro specifically, JBang eliminates the need to download JAR files manually and remember complex command-line options.
JBang’s power comes from its alias and catalog system. As the JBang documentation explains:
To avoid remembering long paths and to enable easy launch of jbang scripts there is an alias command to setup and manage aliases to actual scripts.
An alias acts as a shortcut to a Java script, Maven artifact, or Git repository. For example:
jbang alias add --name hello https://github.com/jbangdev/jbang-examples/blob/HEAD/examples/helloworld.java
This command adds an alias named hello pointing to the specified GitHub URL, which you can then run with:
jbang hello
Catalogs take this further by allowing you to share collections of aliases across teams and projects – perfect for standardizing Jakarta EE tooling.
Following the same pattern, we can create an alias for Payara Micro:
jbang alias add --name micro fish.payara.extras:payara-micro:6.2025.2
Now you can start Payara Micro with a simple command:
jbang micro
While local aliases are useful, JBang’s true power comes from its catalog system. Catalogs allow you to share sets of aliases across teams and projects.
JBang supports “implicit catalogs” that follow a special format, making it easy to access remote catalogs without explicit setup. For example:
There’s already a dedicated catalog for Jakarta EE development with Payara tools available at https://github.com/pedanticdev/jbang-catalog . The catalog contains:
{
"catalogs": {},
"aliases": {
"pcl": {
"repositories": ["payara=https://nexus.payara.fish/repository/payara-artifacts"],
"script-ref": "fish.payara.cloud:pcl:1.1.0",
"description": "pcl is command line utility for managing Payara Cloud namespaces and applications."
},
"micro": {
"script-ref": "fish.payara.extras:payara-micro:6.2024.10",
"description": "Payara Micro is an embedded release of Payara built from the Payara Embedded Web release. It allows you to deploy and run WAR files from the command line with a single command, and also features automatic, dynamic clustering with Hazelcast."
}
},
"templates": {}
}
To add this catalog to your JBang installation:
jbang catalog add --name payara https://github.com/pedanticdev/jbang-catalog/blob/main/jbang-catalog.json
Or use the implicit catalog format:
jbang catalog add --name payara pedanticdev/jbang-catalog
Now you can access the aliases in the catalog:
# List all aliases in the catalog
jbang alias list payara
# Run Payara Micro
jbang micro@payara
# Deploy a WAR file
jbang micro@payara --deploy myapp.war
# Use Payara Cloud CLI
jbang pcl@payara namespace list
As the JBang documentation notes:
In fact, it’s possible to run the alias just by using jbang run hello, the @demo part is only necessary when trying to disambiguate between aliases with the same name from different catalogs.
For team settings, you have two options:
JBang will search for catalog files in multiple locations:
This allows you to have project-specific catalogs that customize the Jakarta EE environment for each project.
Let’s look at some practical examples of how to use the Payara catalog:
# Start Payara Micro with default settings
jbang micro@payara
# Start with custom port
jbang micro@payara --port 9090
# Deploy a WAR file
jbang micro@payara --deploy myapp.war
# Deploy with context root
jbang micro@payara --deploy myapp.war --contextroot app
# List namespaces
jbang pcl@payara namespace list
# Create a new namespace
jbang pcl@payara namespace create my-project
# Deploy an application to Payara Cloud
jbang pcl@payara deploy my-app myapp.war
# List deployed applications
jbang pcl@payara app list
JBang’s alias and catalog features, with this pre-configured Payara catalog, can create a simplified Jakarta EE development workflow that’s easy to set up, share, and maintain. This approach reduces the friction of Jakarta EE development without sacrificing its power and flexibility.
Start using JBang with the Payara catalog today to simplify your Jakarta EE development process!
Share:
4 minutes
We’re excited to share major updates around the Docker image story for the Payara Platform Community, aligned with our […]
5 minutes
Payara Cloud is becoming part of Payara Qube family of Java application deployment runtimes. This move reflects how the […]
6 minutes
If you’ve been living in the Spring ecosystem, you’re used to fast project setup. Spring Initializr gives you a […]