Questions tagged [jaotc]

Jaotc is the Java Ahead-of-Time Compiler. It allows to generate native code from Java Byte Code.

Jaotc is the Java Ahead-of-Time Compiler. It allows to generate native code from Java Byte Code.

Documentation:

11 questions
10
votes
2 answers

How do I run a class compiled with jaotc?

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…
user11171
  • 3,821
  • 5
  • 26
  • 35
5
votes
1 answer

Compile single class with jaotc of Java 10

I would like compile a Java 10 class file with jaotc. While I am able to build a shared lib of an Java 10 module I am not able figure out how to compile a single class. The FQCN of my class is net.sweblog.jm18.aot.hw.HelloWorld and its full path is…
Oliver
  • 3,815
  • 8
  • 35
  • 63
4
votes
0 answers

Is jaotc for Java Ahead of Time Compilation available for armv7 (32bit)

My slow BlackBox device with a single armv7 CPU uses Java 14. The JRE is custom built (not by me) but is missing jaotc which is unfortunate because I really hoped to try it for this device. I thought jaotc was now available for all environments, or…
Paul Taylor
  • 13,411
  • 42
  • 184
  • 351
4
votes
1 answer

Can you use jaotc (Java Ahead-of-Time Compiler) with jlink (module assembler/optimizer to create runtime images)?

The goal here is to: Create a runtime image that has it's own stripped down JRE (minimize size) - this is what jlink gives us Create natively executable libraries instead of using byte code (improve load times and hopefully remove the need to…
Sooth
  • 2,834
  • 23
  • 26
4
votes
0 answers

jaotc fails to find classes from java.base

How to setup/run jaotc so it can find standard JDK classes ? Using JDK 9 expiremental AOT compiler to pre-build some of the libraries, many fail for similar reasons. e.g. jaotc --compile-for-tiered --info --output ../aoclib/postgresql-9.4.1208.so…
sinus0
  • 41
  • 1
3
votes
1 answer

Why do I need JVM to run an AOT compiled code?

Im learning about GraalVM and AOT and I was reading the spec for AOT and then I got confused, if AOT compiles my code to machine code (native) why do I need a JVM? why I need this: java -XX:AOTLibrary=./libHelloWorld.so HelloWorld
user2566397
  • 89
  • 10
1
vote
2 answers

Original class file still needed after jaotc compilation?

For those who know jaotc, I have a simple question for you. After you do javac HelloWorld.java jaotc --output HelloWorld.so HelloWorld.class You can run java -XX:AOTLibrary=./HelloWorld.so HelloWorld without any problem. This is what has been…
Joe
  • 53
  • 6
1
vote
3 answers

How to download jaotc?

Everyone is referring jaotc to http://openjdk.java.net/jeps/295. But from that web page, I cannot figure how to download jaotc.
0
votes
0 answers

Why my program is slower with Java AOT than classical java execution

I'm currently trying java Ahead of Time feature. I execute the following code: public class CountUppercase { static final int ITERATIONS = Math.max(Integer.getInteger("iterations", 1), 1); public static void main(String[] args) { …
bmeynier
  • 289
  • 2
  • 12
0
votes
1 answer

jaotc library fails to run in javac; java says there is no main method

I'm try to compile a mini-benchmark to native code for Ubuntu 18.04 running on WSL. I'm comparing it to functionally identical code written in C# which is being compiled to Dotnet Native, which runs about 10x faster than MSIL code. I want this to…
The Sharp Ninja
  • 1,041
  • 9
  • 18
-1
votes
1 answer

Is this sentence about AoT correct?

ART is based on AOT (ahead-of-time) technology that compiles the code during the installation of the app, increasing the installation time of an app
Gheo
  • 3
  • 3