The example uses GNU gcj to generate native executable from java source.
Note:
<project> [...] <packaging>uexe</packaging> [...] <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>native-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <compilerExecutable>gcj</compilerExecutable> <compilerOutputDirectory}${project.build.directory}/objs</compilerOutputDirectory> <sources> <source> <directory>src/main/java</directory> <includes> <include>**/*.java</include> </includes> </source> </sources> <compilerStartOptions> <compilerStartOption>-O2</compilerStartOption> </compilerStartOptions> <linkerExecutable>gcj</linkerExecutable> <linkerStartOptions> <linkerStartOption>--main=full.class.name</linkerStartOption> </linkerStartOptions> </configuration> </plugin> </plugins> </build> </project>