- About.
- Documentation.
- Benefits.
- Maven Commands.
- Native Image.
- Build a native executable.
- Articles.
- Conferences.
- Conference Speakers.
- Help.
- Quarkus.
- QUTE REFERENCE GUIDE
- Hot Reload.
- Reactive Programming Style.
- DEPLOYING ON KUBERNETES AND OPENSHIFT
- EXTENSIONS.
- Platform Dependent Application.
- Developer Joy.
- Supersonic Subatomic Java.
- Unifies imperative and reactive.
- Best of breed libraries and standards.
mvn io.quarkus:quarkus-maven-plugin:create
mvn quarkus:dev
Running the application in dev mode.mvn compile quarkus:dev
Compile the application in dev mode.mvn quarkus:list-extensions
Show list of extensions.mvn quarkus:add-extension -Dextensions="groupId:artifactId"
Adding extension.mvn quarkus:add-extension -Dextensions="hibernate-*"
You can install all extensions which match a globbing pattern.mvn package
For packaging application. Be aware that it’s not an über-jar as the dependencies are copied into thetarget/lib
directory.mvn package -Pnative
Compilation into native code.mvn verify -Pnative
mvn verify -Pnative -Dquarkus.test.native-image-profile=test
mvn failsafe:integration-test
mvn package -Pnative -Dquarkus.native.container-build=true
You can use Docker to build the native executable.mvn quarkus-bootstrap:build-tree
Displays the build dependency tree for the application.mvn package -Pnative -Dquarkus.native.container-build=true
Support only JDK8mvnw package -Pnative -Dquarkus.native.container-runtime=docker
mvnw package -Pnative -Dquarkus.native.container-runtime=podman
- Need registration: reflection, dynamic proxy.
- Not supported: Dynamic Class Loading, Method Handlers, Invoke Dynamic.
- Different: Static Initialization on build-time.
- The native executable for our application will contain the application code, required libraries, Java APIs, and a reduced version of a VM. The smaller VM base improves the startup time of the application and produces a minimal disk footprint.
- Building a native executable.
- TIPS FOR WRITING NATIVE APPLICATIONS
-
sudo update-alternatives --install /usr/bin/java java /path/.../bin/java 13
-
sudo update-alternatives --install /usr/bin/javac javac /path/.../bin/javac 13
-
sudo update-alternatives --install /usr/bin/javadoc javadoc /path/.../bin/javadoc 13
. -
sudo update-alternatives --config java
-
sudo update-alternatives --config javac
-
java -version
-
javac -version
. -
export JAVA_HOME=/pathToMainFolder
-
echo $JAVA_HOME
-
export PATH=$JAVA_HOME/bin:$PATH
. -
export GRAALVM_HOME=/pathToMainFolder
-
echo $GRAALVM_HOME
-
export PATH=$GRAALVM_HOME/bin:$PATH
. -
source /home/trl/.profile
. -
$GRAALVM_HOME/bin/gu install --file native-image-installable-svm-svmee-java11-linux-amd64-20.0.0.jar
-
Or add a line "GRAALVM_HOME=$JAVA_HOME" in a file with a name ".profile". This file is in the home directory. And when you change "JAVA_HOME", the "GRAALVM_HOME" will change.