Chapter 7. Packaging and running the Quarkus Getting Started application


After you compile your Quarkus Getting Started project, you can package it in a JAR file and run it from the command line.

Prerequisites

  • You have compiled the Quarkus Getting Started project.

Procedure

  1. To package your Quarkus Getting Started project, enter the following command in the root directory:

    ./mvnw package
    Copy to Clipboard Toggle word wrap

    This command produces the following JAR files in the /target directory:

    • getting-started-1.0-SNAPSHOT.jar: Contains the classes and resources of the projects. This is the regular artifact produced by the Maven build.
    • getting-started-1.0-SNAPSHOT-runner.jar: Is an executable JAR file. Be aware that this file is not an uber-JAR file because the dependencies are copied into the target/lib directory.
  2. If development mode is running, press CTRL+C to stop development mode. If you do not do this, you will have a port conflict.
  3. To run the application, enter the following command:

    java -jar target/getting-started-1.0-SNAPSHOT-runner.jar
    Copy to Clipboard Toggle word wrap
    Note

    The Class-Path entry of the MANIFEST.MF file from the runner JAR file explicitly lists the JAR files from the lib directory. If you want to deploy your application from another location, you must copy the runner JAR file as well as the lib directory.

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat