Hacker News new | ask | show | jobs
by derleth 5320 days ago
> A faster Java that doesn't require a virtual machine?

I don't know about 'faster', but gcj has been compiling Java to machine code for a while now.

From the homepage:

> GCJ is a portable, optimizing, ahead-of-time compiler for the Java Programming Language. It can compile Java source code to Java bytecode (class files) or directly to native machine code, and Java bytecode to native machine code.

http://gcc.gnu.org/java/

2 comments

Every single thing I have measured(which, granted, does not cover that much), openjdk comes out way ahead of gcj in terms of speed.

Similarly, running eclipse under gcj is not something you want to do, it becomes slow.

You should try Excelsior JET compiled Eclipse then.

(see: http://www.excelsior-usa.com/)

[disclaimer: I've worked for Excelsior LLC back then when initial support for AOT compilation of Eclipse was implemented]

Yes, it's also ridiculously difficult to get working. I'm not entirely convinced it's possible to get it to work anymore without some serious hacking; and OS X doesn't include it in their dev package.
See, in Ubuntu, I do 'sudo apt-get install gcj', hit enter twice (to bring in all the dependencies), and a little while later I have gcj up and running on my system.

I don't doubt it needs hacking to get running; I probably wouldn't want to install the latest release from source. However, when you have the package maintainers of two distros (Debian and Ubuntu) on your side, things get a bit easier.