Hacker News new | ask | show | jobs
by zerr 3039 days ago
I'm not in Java world, but I remember there were talks about future AOT awhile ago - is this a thing now? i.e. you don't have to ship the whole JVM, and no more bytecode, just a native executable?

If this is a thing now, supported and official - why it's not more popular? (or maybe I'm wrong).

2 comments

Because of the crowd that doesn't want to pay for AOT compilers.

The majority of commercial JDKs always supported AOT to native code, only Sun did not, as they were religiously against AOT.

Oracle thankfully thinks otherwise, has kept sponsoring MaximeVM research, which became Graal and SubstrateVM, and now they are in the process of even re-writing the C++ parts into Java (Project Metropolis).

>I remember there were talks about future AOT awhile ago - is this a thing now?

Yes, AoT is now supported in Java out of box. Java after Jigsaw projects is modularized and you can build an executable file, like .exe or .bin which contains minimal JVM in it with JVM modules and your own modules and it's dependencies. You can read more about it here https://steveperkins.com/using-java-9-modularization-to-ship...

>If this is a thing now, supported and official - why it's not more popular? (or maybe I'm wrong).

Probably because a lot of developers still think Java is slow, many peoples opinion on Java is from 10 years ago. AoT was officially released in OpenJDK a few weeks ago, so as you can see, a lot of people don't know about it yet.