I compiled a simple class using the Java 9 Ahead-Of-Time Compiler jaotc
using the following command:
javac Test.java
jaotc Test.class
This produces a file named unnammed.so
. How do I run the compiled program? Do I need to write a bootstrap program to link with the .so file?
After executing an AOT compilation, you need to specify generated AOT library during application execution:
You should also compile
java.base
to gain real improvement, performance wise:Note that the same java runtime configuration should be used during AOT compilation and execution.
For Example:
Take a look at this, for more information.