The way I have Jasper running in 3.2.4, I have JikesJavaCompiler set up to 
pass the -bootclasspath and -extdirs parameters to Jikes, based on 
sun.boot.class.path and java.ext.dirs.  It seemed to work quite well; it 
meant that Jikes did not need any special handling in terms of setting up 
the classpath on Win32.

I recently started looking at Tomcat 4.0.5 and noticed that it doesn't do 
this, so I made a little patch against 4.0.5.

--- JikesJavaCompiler.java.orig Mon Sep 23 10:39:02 2002
+++ JikesJavaCompiler.java      Mon Oct 07 18:04:16 2002
@@ -187,11 +187,16 @@

         String[] compilerCmd = null;

+       String bootClassPath = System.getProperty("sun.boot.class.path");
+       String extDirs = System.getProperty("java.ext.dirs");
+
         if( outdir != null ) {
             compilerCmd = new String[] {
                quote + compilerPath + quote,
                //XXX - add encoding once Jikes supports it
                "-classpath", quote + classpath + MicrosoftClasspath + quote,
+                "-bootclasspath", quote + bootClassPath + quote,
+                "-extdirs", quote + extDirs + quote,
                "-d", quote + outdir + quote,
                "-nowarn",
                 "+E",
@@ -202,6 +207,8 @@
                 quote + compilerPath + quote,
                 //XXX - add encoding once Jikes supports it
                 "-classpath", quote + classpath + MicrosoftClasspath + 
quote,
+               "-bootclasspath", quote + bootClassPath + quote,
+               "-extdirs", quote + extDirs + quote,
                 "-nowarn",
                 "+E",
                 quote + source + quote
end-of-patch

The quotes don't seem to be necessary, but I followed the convention used in 
the 4.0.5 source code.

I don't know whether these extdirs and bootclasspath arguments exist on 
Jikes/Linux, and I doubt the Microsoft Java VM would have those system 
properties.

Sorry, nothing for 4.1.x; my company only recently added official support 
for 4.0.5 after staying at 3.2.x for the longest time.  It should be trivial 
to add to the same in 4.1, though.


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to