“When it was first introduced, it seemed that Java native compilation would surely topple the JVM, taking with it the Java platform’s hard-fought platform independence. But even with its growing popularity and the increasing number of native compilers on the market, native compilation has a way to go before it poses a real threat to Java code’s portability. Unfortunately, it also may be a while before the technology is mature enough to resolve the Java performance issues so many of us struggle with today.” The article discusses the pros and cons of generating native code from Java source. Update: Steve Klingsporn says “TowerJ compiles java byte code into native code, and works quite well.”
Part of the power of hotspot is that optimizes code as it is running. It is able to leverage statistical information and usage patterns in its optimization (“this code is not being used right now”, and “this code will not be used again”). Those decisions can be reevaluated at any time. The point is that higher optimization can be achieved than with static compiler optimization.
TowerJ looks very uninteresting
If you want native java for Windows get Excelsior Jet. Full support including AWT and Swing. There’s even a free version and a beta version for Java 1.4rc.
http://www.excelsior-usa.com/jet.html
I haven’t tried it for quite some time and I think I’ll check out the beta version with some Swing app.
There has recently been a discussion about native compilation at JavaLobby:
http://www.javalobby.com/discussionContext/showThreaded/frm/javalob…