- GraalVM installed as JDK
- Native Image installed via gu
- Single
jar
file project
- Create a new maven project
- Add the maven assembly plugin and configure it to produce a single jar file with dependencies. For an example see Maven Single Jar Example
- Execute
mvn package
to produce the jar file with dependencies - Execute
java -jar [PROJECT_NAME]-jar-with-dependencies.jar
to see if your program is able to execute - Execute `native-image -jar [PROJECT_NAME]-jar-with-dependencies.jar [TARGET_NATIVE_FILE_NAME]
- Execute
./[TARGET_NATIVE_FILE_NAME]
to see if it is able to execute. - Under Linux you can use
time
to see the actual execution time of both programs.