![]() |
||||||||||||||||||||||||||||||||||||||
Myths and facts about ahead-of-time compilation of Java applicationsThere is a number of misconceptions established in the developer community about ahead-of-time (AOT) compilation of Java applications to native code. Below, we shall take a look at the most popular myths. Myth 1: An AOT-compiled Java application cannot use the dynamic facilities: reflection, dynamic class loading, etc. Facts: Excelsior JET has been certified for compliance with the Java SE 6 specification, and comes with a fully licensed Java SE 6 API implementation. This means it can optimize any Java application that is coded to the specification. In particular, Excelsior JET supports Java Reflection and reflection-based APIs such as serialization, RMI, etc. It means that your JET-compiled application can de-serialize files created by any JVM, JET-compiled RMI server can communicate with RMI clients running under another JVM, and so on. You may wish to check out the samples in the samples/RMI subdirectory of your JET installation. Excelsior JET fully supports dynamic loading of classes that were not pre-compiled as well as the mechanism of custom classloaders. For that purpose, it features a JIT compiler that can be distributed along with the pre-compiled part of application. The Professional Edition also includes a JIT Caching Engine that stores JIT compilation results to disk for reuse on subsequent launches. You may wish to check out the samples in the samples/Classloaders subdirectory of your JET installation. For more information, consult Excelsior JET User's Guide, Chapter "Mixed Compilation Model". Myth 2: Using an AOT compiler, you immediately lose portability of your Java application. Facts: Indeed, Excelsior JET produces platform-specific executables, but it neither destroys nor alters your class files in any way so that they become non-portable. There is also no need to make any changes in your source code. Therefore, you may continue deploying your application as bytecodes to other platforms. Facts: One size does not fit all - both approaches have their advantages. For some applications AOT compilers work better for the others - dynamic compilation yields better results. It's hard to determine that in advance so you may check that on your Java applications. Myth 4: AOT compilation always speeds up your Java application. Facts: Sometimes, performance improvement is not significant (e.g. when native methods take the most of CPU time). Nevertheless, AOT compilation has other advantages that may be even more important for your application than performance boost. Myth 5: Use of an AOT compiler breaks your development cycle. Facts: It does not affect most of your development cycle at all. You continue using your favorite tools for design, coding, debugging, and testing, without any changes. Once your application reaches stability, you compile and package it with Excelsior JET, conduct quality assurance testing and deploy to enduser systems. |
|
|||||||||||||||||||||||||||||||||||||
Search powered by |
Copyright © 1998-2008 XLsoft Corporation. All Rights Reserved. Contact Us | Privacy | Site Map |
|||