After you compile your Quarkus Getting Started project, package it in a JAR file and run it from the command line. The packaged application runs on a standard JVM without dev mode and is suitable for handoff to a runtime environment.

Prerequisites
  • You have compiled the Quarkus Getting Started project.

Procedure
  1. Go to the getting-started project directory.

  2. To package your Quarkus Getting Started project, use one of the following methods, depending on the developer tool that you intend to use:

    • If you prefer to use Apache Maven:

      mvn package

       

    • If you prefer to use the Quarkus CLI:

      quarkus build

       

    • If you prefer to use the Maven wrapper:

      ./mvnw package

       

      This command produces the following output in the target directory:

      • quarkus-app/quarkus-run.jar: The executable JAR file for your application. This file is not an uber-JAR. Dependencies are copied to the target/quarkus-app/lib directory and must be present for the application to run.

  3. To start your application, enter the following command:

    java -jar target/quarkus-app/quarkus-run.jar

     

    Note:

    • Before you run the application, stop dev mode by pressing Ctrl+C to avoid a port conflict.

    • The Class-Path entry of the MANIFEST.MF file in the quarkus-run.jar file explicitly lists the JAR files from the lib directory. To deploy your application from another location, deploy the whole quarkus-app directory.

    Important: Various IBM Enterprise Build of Quarkus extensions contribute non-application endpoints that provide different kinds of information about the application. For example, the quarkus-smallrye-health, quarkus-micrometer-registry-prometheus, and quarkus-smallrye-openapi extensions.

    You can access these non-application endpoints by specifying a /q prefix. For example, /q/health, /q/metrics, /q/openapi.

    For non-application endpoints that might present a security risk, you can expose those endpoints under a different TCP port by using a dedicated management interface. For more information, see the Quarkus Management interface reference guide.