Switched to the Jikes compiler in Emacs JDE, Weblogic, and Ant today. MUCH FASTER!!! Love it. I had this set up once before and when I reloaded my machine, I forgot Jikes. Don't know why I thought of it again, but I'm glad I did. My compile on 80 Java files with Ant is down to 11 seconds.
Setup for JDE is really easy. Go to the JDE menu -> Project -> Options -> General. Edit the JDE Compiler setting. If you use Windows CMD as your shell, do something like: "c:/jikes-1.18/bin/jikes.exe -bootclasspath C:/j2sdk1.4.0_01/jre/lib/rt.jar". The bootpath is so that Jikes can find the Java classes (it doesn't come with them). Since I use Cygwin bash as my shell under Emacs, I have to add a "cmd /c" to the beginning of that line to get Jikes to run correctly. (I haven't compiled it under Cygwin -- just standard Windows distribution.)
Setup for Weblogic is easy as well. To change Weblogic 7, go to the console for the server. Click on your server. There should be a tab called compilers. Just change the compiler to something like "c:/jikes-1.18/bin/jikes.exe".
Setup for Ant is a little more involved, but not bad. It's straight out of the Ant manual, so I won't go in to much detail. I'll share the snipets from my build.xml file that I changed to make the magic:
<property name="build.compiler" value="jikes"/>
<!-- Java runtime --> <fileset id="lib.javart" dir="C:/j2sdk1.4.0_01/jre/lib"> <include name="rt.jar"/> </fileset>
<!-- Classpath --> <path id="project.class.path" description="Project classpath"> <fileset dir="${libdir}"> <include name="**/*.jar"/> </fileset> <pathelement path="${packageclassdir}"/> <fileset refid="lib.j2ee" /> <fileset refid="lib.javart" /> </path>
So, all I did for ANT was to add the build.compiler property, add a fileset that defined my Java runtime, and finally added that to my classpath.
11:04:02 AM
|