Hacker News new | ask | show | jobs
by Teckla 4196 days ago
Java AOT compilers

Java AOT compilers? What Java AOT compilers?

I know about Excelsior JET ($$$$) and gcj (abandoned). Do you know of any free and good Java AOT compilers?

1 comments

I don't care if they are free or not. The point is that is technical feasible and they do exist.

Most commercial JVMs like IBM Websphere for Real Time, Aonix and JamaicaVM, just to cite three examples, do offer AOT compilation.

Java on IBM i mainframes is translated to the same bytecode used by C and C++ (yes I really mean bytecode not Assembly, IBM i has a kernel JIT).

Then you have RoboVM, CodenameOne, JikesRVM, SubstrateVM.

SubstrateVM is done by the same Oracle Labs working on Graal.

RoboVM is how LibGDX guys are targeting iOS.

And Oracle is changing the OpenJDK to eventually support AOT compilation.

http://openjdk.java.net/jeps/197

Currently the only free on that might suit you, in case you only care about UNIX environments is RoboVM.

Thanks for taking the time to respond!

I'd love a Java AOT compiler that produces native binaries with no additional dependencies. (I'd even be okay if, as a side effect, some Java features were not supported, making it technically not-Java.)

For small tools and utilities, the JVM requirement is quite onerous, especially when one does not know if the end user has Java installed, or if they do, what version.

Alas, the company I work for will not budget for a Java AOT compiler, and for my hobby programming, the commercial Java AOT compilers are far too expensive to justify.

I'll just keep hoping a good and free (or inexpensive) Java AOT compiler becomes available some day. I would even donate money and/or code if a serious project started.

> For small tools and utilities, the JVM requirement is quite onerous, especially when one does not know if the end user has Java installed, or if they do, what version.

There some efforts in this direction with the OpenJDK.

As of Java 8 there is an application packager that brings everything together.

https://docs.oracle.com/javase/8/docs/technotes/guides/deplo...

And the size of the native runtime has been reduced.

http://openjdk.java.net/jeps/148

> I'll just keep hoping a good and free (or inexpensive) Java AOT compiler becomes available some day. I would even donate money and/or code if a serious project started.

If you are on GNU/Linux, Mac OS/X check RoboVM.

http://www.robovm.com/

I sincerely apologize, I just now noticed you've answered my same query on other threads.