jaotc

How do I run a class compiled with jaotc?

梦想的初衷 提交于 2019-12-22 04:32:37
问题 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? 回答1: After executing an AOT compilation, you need to specify generated AOT library during application execution: java -XX:AOTLibrary=./Test.so Test You should also compile java.base to gain real improvement, performance

How do I run a class compiled with jaotc?

有些话、适合烂在心里 提交于 2019-12-05 03:34:37
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: java -XX:AOTLibrary=./Test.so Test You should also compile java.base to gain real improvement, performance wise: jaotc --output libjava.base.so --module java.base Note that the same java runtime configuration should