BAEL-2572 Ahead of Time Compilation (AoT) (#6275)
This commit is contained in:
parent
e6f9af4c3f
commit
ba16cee334
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
cd src/main/java
|
||||
javac com/baeldung/java9/aot/JaotCompilation.java
|
||||
jaotc --output jaotCompilation.so com/baeldung/java9/aot/JaotCompilation.class
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
cd src/main/java
|
||||
java -XX:AOTLibrary=./jaotCompilation.so com/baeldung/java9/aot/JaotCompilation
|
|
@ -0,0 +1,12 @@
|
|||
package com.baeldung.java9.aot;
|
||||
|
||||
public class JaotCompilation {
|
||||
|
||||
public static void main(String[] argv) {
|
||||
System.out.println(message());
|
||||
}
|
||||
|
||||
public static String message() {
|
||||
return "The JAOT compiler says 'Hello'";
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue