3 ms·
You will be excited to learn about gcj, then. The Gnu Java compiler compiles to native code, but it's currently not maintained, so newer Java features are out o
by Teckla 12y ago
You will be excited to learn about gcj, then. The Gnu Java compiler compiles to native code, but it's currently not maintained, so newer Java features are out of reach.
gcj has been abandoned. It was last updated over 5 years ago. It's not clear to me why you would even mention it.
I'm a software developer that primarily uses and likes Java, and the lack of a good and free ahead-of-time compiler for Java that produces native binaries is what I miss most in the Java ecosystem.
- mike_hearn 12y agoThere's Avian. It can produce standalone, compact ELF files that have no dependencies. It's not an AOT compiler though. The problem with AOT in the Java ecosystem is quite a lot of modern frameworks and the like have ended up relying on the ability to synthesise code at runtime. Android has put a check on that kind of behaviour but it's still there. There's also Excelsior, which is an AOT JVM, but it's for Windows only. I agree that a really good AOT JVM would be very nice. It doesn't necessarily imply better performance however. I remember when GCJ compiled Eclipse for the first time, lots of people were surprised that it didn't magically fix every performance problems. GCJ engineers view was "HotSpot is an excellent compiler and it will take a lot of effort to beat it". When Sun Java became open source therefore, a lot of the incentive to develop GCJ disappeared. It was always primarily a licensing project not a performance project.
- Teckla 12y agoThere's also Excelsior, which is an AOT JVM, but it's for Windows only. Unfortunately, it's also extremely expensive. That's not to say it isn't worth every penny in some situations, but I've gotten kind of spoiled by free development tools for personal projects. I'm glad the days of spending hundreds of dollars for things like C compilers are long behind me. I agree that a really good AOT JVM would be very nice. It doesn't necessarily imply better performance however. For some application domains, I would be happy to trade speed -- and even features -- for the ability to create a native binary with no dependencies. This is one area where I find the Go programming language interesting. I prefer Java, but the lack of a good and free ahead-of-time compiler for Java that creates native binaries with no additional dependencies is a killer feature for some situations.
- tormeh 12y agoLooks like it is Windows, Linux and Mac. No 32bit on Mac, though. http://www.excelsiorjet.com/ http://www.excelsiorjet.com/
- pjmlp 12y agoThen you might be happy to know that AOT is planned for the reference implementation for Java 9, eventually Java 10. Also that Oracle Labs have SubstrateVM, which is an AOT compiler based on Graal. Then there is also JikesRVM and RoboVM.